Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cancel Events Pin
maheswara18-Jul-05 2:17
maheswara18-Jul-05 2:17 
GeneralRe: Cancel Events Pin
Beringer18-Jul-05 10:22
Beringer18-Jul-05 10:22 
QuestionConnecting ORACLE to C# ? Pin
Member 198359717-Jul-05 20:14
Member 198359717-Jul-05 20:14 
AnswerRe: Connecting ORACLE to C# ? Pin
V.17-Jul-05 22:57
professionalV.17-Jul-05 22:57 
AnswerRe: Connecting ORACLE to C# ? Pin
Vasudevan Deepak Kumar17-Jul-05 23:17
Vasudevan Deepak Kumar17-Jul-05 23:17 
QuestionImporting in Access pogrammatically? Pin
kbalias17-Jul-05 18:38
kbalias17-Jul-05 18:38 
AnswerRe: Importing in Access pogrammatically? Pin
Kodanda Pani17-Jul-05 19:55
Kodanda Pani17-Jul-05 19:55 
GeneralQuestions about objects and class Pin
tttyip17-Jul-05 18:27
tttyip17-Jul-05 18:27 
I have some questions on creating objects and classes.
1) When a member in the base class (class A) is declared as private (say "private int x"), will the instance of the derived class (class B) has a that private member? Is that an inherited class always inherits all members of the base class but cannot access the private members? (For example, in this case, class B also has "private int x", but cannot access "x" )?

2) When a method in the base class (class A) is overridden by the derived class (class B), is that the overridden version of the method be always called?
For example,
class A
{
public virtual void Test()
{
Console.WriteLine("This is A");
}
}

class B : A
{
public virtual void Test()
{
Console.WriteLine("This is B");
}
}


static void Main()
{
B b = new B(); A a = b;
b.Test();
a.Test();
}

The above code sample is copied from a book, but I am confused.....
I know the statement "b.Test()" will cause the output "This is B"
but how about "a.Test()", as a is referenced to the object of type B, which version of the method will be called?
What is meant by "A a = b"?

Again, thanks a lot for your help!!

Regards,
Tommy

GeneralRe: Questions about objects and class Pin
Christian Graus17-Jul-05 19:06
protectorChristian Graus17-Jul-05 19:06 
Generalquestion ==> planing phase Pin
daat9917-Jul-05 17:49
daat9917-Jul-05 17:49 
GeneralAccessing actual image data from the Internet Explorer DOM tree Pin
chrismetcalf17-Jul-05 16:24
chrismetcalf17-Jul-05 16:24 
GeneralBump! Pin
chrismetcalf19-Jul-05 7:13
chrismetcalf19-Jul-05 7:13 
GeneralAccessing information about the current page's SSL security from a C# Browser Helper Object Pin
chrismetcalf17-Jul-05 16:20
chrismetcalf17-Jul-05 16:20 
GeneralBump! Pin
chrismetcalf19-Jul-05 7:13
chrismetcalf19-Jul-05 7:13 
GeneralMicrosoft C# beta 2 Pin
Underhillron17-Jul-05 15:17
Underhillron17-Jul-05 15:17 
GeneralRe: Microsoft C# beta 2 Pin
Judah Gabriel Himango17-Jul-05 17:11
sponsorJudah Gabriel Himango17-Jul-05 17:11 
QuestionHow to use the texture as the background of bars in mschart? Pin
luckyeagle17-Jul-05 15:09
luckyeagle17-Jul-05 15:09 
Generalweird threads in forms Pin
mihai_152917-Jul-05 11:37
mihai_152917-Jul-05 11:37 
GeneralRe: weird threads in forms Pin
Rob Graham17-Jul-05 12:10
Rob Graham17-Jul-05 12:10 
GeneralRe: weird threads in forms Pin
S. Senthil Kumar17-Jul-05 18:08
S. Senthil Kumar17-Jul-05 18:08 
GeneralRe: weird threads in forms Pin
mihai_152918-Jul-05 1:49
mihai_152918-Jul-05 1:49 
Generale-mail status Pin
Member 210401417-Jul-05 10:08
Member 210401417-Jul-05 10:08 
GeneralRe: e-mail status Pin
Member 198359717-Jul-05 20:43
Member 198359717-Jul-05 20:43 
GeneralInsert in SP using OdbcCommand Object Pin
lovelylooney17-Jul-05 9:49
lovelylooney17-Jul-05 9:49 
GeneralRe: Insert in SP using OdbcCommand Object Pin
lovelylooney17-Jul-05 9:55
lovelylooney17-Jul-05 9:55 

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.