Click here to Skip to main content
15,909,205 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to hide a inherited method or property? Pin
turbochimp11-Jan-05 7:28
turbochimp11-Jan-05 7:28 
I don't think there is any way to hide the method in the manner you describe, and since it is a virtual method of the base (ArrayList) class, there's not really a way to obscure it - the accessibility of public virtual members can't be altered by the inheriting class.

The framework doesn't allow partial implementation inheritance. You could, however, change the behavior of your overridden version of the Add method to keep it from doing anything.

Perhaps a better option might be to create a new class that employs an ArrayList as a private field. You would then be free to manipulate the contents of the ArrayList at your discretion. Of course you lose some polymorphic benefits by doing so. You could also create a new Collection-type class (Add is not a member of the ICollection interface).

The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’

AnswerRe: How to hide a inherited method or property? Pin
Jesse Squire11-Jan-05 9:31
Jesse Squire11-Jan-05 9:31 
AnswerRe: How to hide a inherited method or property? Pin
Daniel Zaharia11-Jan-05 20:50
Daniel Zaharia11-Jan-05 20:50 
Generalquestionnaire builidng application Pin
ramrod197911-Jan-05 5:23
ramrod197911-Jan-05 5:23 
QuestionCan you load any application in MDI Child Window? Pin
James Bolles (elpaso)11-Jan-05 5:12
James Bolles (elpaso)11-Jan-05 5:12 
Generalcreating mapfile for c# projects Pin
anurik11-Jan-05 5:09
anurik11-Jan-05 5:09 
Generalcreating mapile for c# projects Pin
anurik11-Jan-05 5:09
anurik11-Jan-05 5:09 
Generalcreating mapile for c# projects Pin
anurik11-Jan-05 5:08
anurik11-Jan-05 5:08 
Generaldisplay arabic characters in windows CE .net Pin
asmb198011-Jan-05 5:07
asmb198011-Jan-05 5:07 
GeneralAdd-in Menus Pin
Guinness4Strength11-Jan-05 4:30
Guinness4Strength11-Jan-05 4:30 
GeneralUserControl problem Pin
Daniel Zaharia11-Jan-05 3:49
Daniel Zaharia11-Jan-05 3:49 
GeneralSize in bytes of a serialized object Pin
fmarcos11-Jan-05 3:47
fmarcos11-Jan-05 3:47 
GeneralRe: Size in bytes of a serialized object Pin
turbochimp11-Jan-05 7:35
turbochimp11-Jan-05 7:35 
GeneralRe: Size in bytes of a serialized object Pin
fmarcos11-Jan-05 14:46
fmarcos11-Jan-05 14:46 
GeneralRe: Size in bytes of a serialized object Pin
turbochimp11-Jan-05 14:52
turbochimp11-Jan-05 14:52 
GeneralVery Slow Startup Time Pin
goodpilot11-Jan-05 2:31
goodpilot11-Jan-05 2:31 
GeneralRe: Very Slow Startup Time Pin
Looney Tunezez11-Jan-05 4:33
Looney Tunezez11-Jan-05 4:33 
GeneralRe: Very Slow Startup Time Pin
Steve Maier11-Jan-05 7:39
professionalSteve Maier11-Jan-05 7:39 
GeneralRe: Very Slow Startup Time Pin
goodpilot11-Jan-05 17:23
goodpilot11-Jan-05 17:23 
GeneralManipulate Excel-Files with C# Pin
Thunderclap0111-Jan-05 1:29
Thunderclap0111-Jan-05 1:29 
GeneralDisplay time in DataGrid column Pin
Anonymous11-Jan-05 0:58
Anonymous11-Jan-05 0:58 
GeneralRe: Display time in DataGrid column Pin
Robert Rohde11-Jan-05 1:42
Robert Rohde11-Jan-05 1:42 
GeneralRe: Display time in DataGrid column Pin
Anonymous11-Jan-05 19:59
Anonymous11-Jan-05 19:59 
GeneralDatabases, ListBoxes and UniqueID's Pin
Harold Clements11-Jan-05 0:38
Harold Clements11-Jan-05 0:38 
GeneralRe: Databases, ListBoxes and UniqueID's Pin
Robert Rohde11-Jan-05 1:51
Robert Rohde11-Jan-05 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.