Click here to Skip to main content
15,908,776 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Tutorials for extreme newbies... Pin
Heath Stewart6-Nov-03 11:37
protectorHeath Stewart6-Nov-03 11:37 
GeneralRe: C# Tutorials for extreme newbies... Pin
Judah Gabriel Himango6-Nov-03 7:01
sponsorJudah Gabriel Himango6-Nov-03 7:01 
Questioncan one class new another? Pin
R. Thomas6-Nov-03 2:26
R. Thomas6-Nov-03 2:26 
AnswerRe: can one class new another? Pin
bjoernen6-Nov-03 3:07
bjoernen6-Nov-03 3:07 
GeneralRe: can one class new another? Pin
R. Thomas6-Nov-03 3:56
R. Thomas6-Nov-03 3:56 
GeneralRe: can one class new another? Pin
bjoernen6-Nov-03 4:41
bjoernen6-Nov-03 4:41 
GeneralRe: can one class new another? Pin
Judah Gabriel Himango6-Nov-03 7:08
sponsorJudah Gabriel Himango6-Nov-03 7:08 
Generalconfusing constructor prob Pin
R. Thomas6-Nov-03 2:17
R. Thomas6-Nov-03 2:17 
hi..i am stuck with this problem..its very very confusing and even after reading book i cannot figure it out...can u pls help me?tks a lot
please consider the code :
class base1<br />
{<br />
	public void call ( base1 b )<br />
	{<br />
		b.f( ) ;<br />
	}<br />
<br />
	public virtual void f( )<br />
	{<br />
		Console.WriteLine ( "In base1" ) ;<br />
	}<br />
}<br />
<br />
class d1 : base1<br />
{<br />
	public override void f( )<br />
	{<br />
		Console.WriteLine ( "In d1" ) ;<br />
	}<br />
}<br />
class d2 : base1<br />
{<br />
	public override void f( )<br />
	{<br />
		Console.WriteLine ( "In d2" ) ;<br />
	}<br />
}<br />
class Class1<br />
{<br />
	static void Main ( string[ ] args )<br />
	{<br />
		base1 b = new base1( ) ;<br />
		d1 o1 = new d1( ) ;<br />
		d2 o2 = new d2( ) ;<br />
<br />
		b.call ( b ) ;<br />
		b.call ( o1 ) ;<br />
		b.call ( o2 ) ;<br />
	}<br />
}

which yeilds :
In base1
In d1
In d2

prob : i dont understand how this result is generated...OMG | :OMG: Frown | :( confused:
allthe calls i see are thru b..but d gets called???WTF | :WTF:
could u pls explain why this is happing??
tks a lot for any help..
really appreciate it..
tks a lot

Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40

GeneralRe: confusing constructor prob Pin
bjoernen6-Nov-03 3:01
bjoernen6-Nov-03 3:01 
Generalaccessing base class fn.. Pin
R. Thomas6-Nov-03 2:09
R. Thomas6-Nov-03 2:09 
GeneralRe: accessing base class fn.. Pin
bjoernen6-Nov-03 3:03
bjoernen6-Nov-03 3:03 
GeneralRe: accessing base class fn.. Pin
R. Thomas6-Nov-03 4:02
R. Thomas6-Nov-03 4:02 
GeneralRe: accessing base class fn.. Pin
bjoernen6-Nov-03 4:42
bjoernen6-Nov-03 4:42 
Generalnoob inherritance prob Pin
R. Thomas6-Nov-03 2:04
R. Thomas6-Nov-03 2:04 
GeneralRe: noob inherritance prob Pin
bjoernen6-Nov-03 2:51
bjoernen6-Nov-03 2:51 
GeneralRe: noob inherritance prob Pin
R. Thomas6-Nov-03 4:04
R. Thomas6-Nov-03 4:04 
GeneralRe: noob inherritance prob Pin
bjoernen6-Nov-03 4:43
bjoernen6-Nov-03 4:43 
GeneralRe: noob inherritance prob Pin
Jeff Varszegi6-Nov-03 7:30
professionalJeff Varszegi6-Nov-03 7:30 
GeneralRe: noob inherritance prob Pin
R. Thomas6-Nov-03 20:16
R. Thomas6-Nov-03 20:16 
GeneralUserControls Pin
Den2Fly6-Nov-03 1:42
Den2Fly6-Nov-03 1:42 
GeneralEnable xp themes via code in 1.0 Pin
Roger Alsing6-Nov-03 1:04
Roger Alsing6-Nov-03 1:04 
GeneralRe: Enable xp themes via code in 1.0 Pin
Heath Stewart6-Nov-03 4:40
protectorHeath Stewart6-Nov-03 4:40 
GeneralRe: Enable xp themes via code in 1.0 Pin
Roger Alsing6-Nov-03 4:45
Roger Alsing6-Nov-03 4:45 
GeneralRe: Enable xp themes via code in 1.0 Pin
Heath Stewart6-Nov-03 11:33
protectorHeath Stewart6-Nov-03 11:33 
QuestionHow can I change memory with IntPtr Pin
System_Reflection5-Nov-03 21:52
System_Reflection5-Nov-03 21:52 

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.