Click here to Skip to main content
15,917,709 members
Home / Discussions / C#
   

C#

 
AnswerRe: a question about windows forms ? help please ... Pin
wheelerbarry10-Aug-06 21:47
wheelerbarry10-Aug-06 21:47 
GeneralMessage Closed Pin
10-Aug-06 22:06
cmpeng3410-Aug-06 22:06 
GeneralRe: a question about windows forms ? help please ... Pin
Colin Angus Mackay10-Aug-06 22:16
Colin Angus Mackay10-Aug-06 22:16 
GeneralRe: a question about windows forms ? help please ... Pin
wheelerbarry10-Aug-06 22:18
wheelerbarry10-Aug-06 22:18 
GeneralRe: a question about windows forms ? help please ... Pin
Stefan Troschuetz10-Aug-06 23:54
Stefan Troschuetz10-Aug-06 23:54 
QuestionHow to override Field Pin
god4k10-Aug-06 20:54
god4k10-Aug-06 20:54 
AnswerRe: How to override Field Pin
Guffa10-Aug-06 21:31
Guffa10-Aug-06 21:31 
AnswerRe: How to override Field [modified] Pin
Filip van der Meeren10-Aug-06 23:08
Filip van der Meeren10-Aug-06 23:08 
I really don't think you can override a field, never did it anyway...
I can't see why you would override a field.
Overriding a field isn't really OOP i guess ...

But if you really want something that is close to the thing you want, you can use properties:

Instead of this:

public class BaseClass
{
protected int i;
}

public class ClassChild: BaseClass
{
//how to override i ?????????
}

use this:

public class BaseClass
{
private int myInt = 0;

protected virtual int i
{
get
{ return myInt;}
}
}

public class SuperClass : BaseClass
{
private int otherInt = 0;
protected override int i
{
get
{
return otherInt;
}
}
}


I didn't implement the set, it is just to show you the picture


-- modified at 5:09 Friday 11th August, 2006


-- modified at 5:09 Friday 11th August, 2006

Students in Belgium still come in handy, don't they ?

GeneralRe: How to override Field Pin
god4k10-Aug-06 23:36
god4k10-Aug-06 23:36 
JokeRe: How to override Field Pin
Filip van der Meeren10-Aug-06 23:47
Filip van der Meeren10-Aug-06 23:47 
QuestionHow to load Xml data(returned from SQL Query) in DOM [modified] Pin
Sana Tanvir10-Aug-06 19:41
Sana Tanvir10-Aug-06 19:41 
AnswerRe: How to load Xml data(returned from SQL Query) in DOM Pin
peshawarcoder10-Aug-06 21:52
peshawarcoder10-Aug-06 21:52 
AnswerRe: How to load Xml data(returned from SQL Query) in DOM Pin
peshawarcoder10-Aug-06 23:12
peshawarcoder10-Aug-06 23:12 
QuestionReading values from specified line from a text file [modified] Pin
cnr36910-Aug-06 19:26
cnr36910-Aug-06 19:26 
AnswerRe: Reading values from specified line from a text file Pin
Ed.Poore10-Aug-06 22:46
Ed.Poore10-Aug-06 22:46 
AnswerRe: Reading values from specified line from a text file Pin
Filip van der Meeren10-Aug-06 23:12
Filip van der Meeren10-Aug-06 23:12 
QuestionConsole App Pin
JacquesDP10-Aug-06 19:21
JacquesDP10-Aug-06 19:21 
AnswerRe: Console App Pin
Christian Graus10-Aug-06 19:58
protectorChristian Graus10-Aug-06 19:58 
QuestionRe: Console App Pin
JacquesDP10-Aug-06 22:46
JacquesDP10-Aug-06 22:46 
AnswerRe: Console App Pin
Colin Angus Mackay10-Aug-06 22:55
Colin Angus Mackay10-Aug-06 22:55 
GeneralRe: Console App Pin
JacquesDP10-Aug-06 23:02
JacquesDP10-Aug-06 23:02 
AnswerRe: Console App Pin
Colin Angus Mackay10-Aug-06 20:08
Colin Angus Mackay10-Aug-06 20:08 
QuestionPass the value from one page to another page..... Pin
Prabs frm PGP10-Aug-06 18:43
Prabs frm PGP10-Aug-06 18:43 
AnswerRe: Pass the value from one page to another page..... Pin
_AK_10-Aug-06 19:40
_AK_10-Aug-06 19:40 
GeneralRe: Pass the value from one page to another page..... Pin
Prabs frm PGP10-Aug-06 20:21
Prabs frm PGP10-Aug-06 20:21 

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.