Method Exposure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a collections class that inherits from CollectionsBase. I've implemented "Add" but I would like that to be the only method exposed...I don't want "RemoveAt" or any of those others in CollectionsBase exposed. Is there a way to do that

Thanks
 
Sure. Don't inherit System.Collections.CollectionBase. Implement IEnumerable
and create your own CollectionBase.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Dave said:
I have a collections class that inherits from CollectionsBase. I've
implemented "Add" but I would like that to be the only method exposed...I
don't want "RemoveAt" or any of those others in CollectionsBase exposed. Is
there a way to do that?
 
Back
Top