Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error using default override code

Status
Not open for further replies.

misterstick

Programmer
Apr 7, 2000
633
GB
i'm deriving a class to extend DataGridTextBoxColumn to include complex custom formatting.

using visual studio as an editor, in the body of the class i type "override" and press spacebar, and intellisense drops down a list of the available overridable stuff.

i press tab to select one and it writes skeleton code for me.

when i come to compile, however, i get the following error:

[tt].\DataGridTextBoxXColumn.cs(18): 'CLBLF.Controls.DataGridTextBoxXColumn.Edit(System.Windows.Forms.CurrencyManager, int, System.Drawing.Rectangle, bool)': cannot change access modifiers when overriding 'protected' inherited member 'System.Windows.Forms.DataGridColumnStyle.Edit(System.Windows.Forms.CurrencyManager, int, System.Drawing.Rectangle, bool)'
[/tt]

change access modifiers? i did no such thing. what on earth is going on?

if you're not allowed to override protected members, why does intellisense taunt you in this way?

mr s. <;)

 
intellisense generated code skeletons containing the keyword [tt]internal[/tt].

Code:
protected internal override void Edit(...

taking this out seems to have solved the problem.

perhaps someone could tell me what this keyword does, and why intellisense would add it if it's not necessary.

many thanks,

mr s. <;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top