Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
GeneralC# Tutorials for extreme newbies... Pin
Fubak6-Nov-03 3:19
Fubak6-Nov-03 3:19 
GeneralRe: C# Tutorials for extreme newbies... Pin
Heath Stewart6-Nov-03 3:39
protectorHeath Stewart6-Nov-03 3:39 
GeneralRe: C# Tutorials for extreme newbies... Pin
Kentamanos6-Nov-03 5:49
Kentamanos6-Nov-03 5:49 
GeneralRe: C# Tutorials for extreme newbies... Pin
J. Dunlap6-Nov-03 8:15
J. Dunlap6-Nov-03 8:15 
GeneralRe: C# Tutorials for extreme newbies... Pin
Kentamanos6-Nov-03 8:19
Kentamanos6-Nov-03 8:19 
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 
hi...
based on the inherritance issue i have one more problem. if you see the code below
class base1<br />
{<br />
	public virtual void f( )<br />
	{<br />
		Console.WriteLine ( "In base1" ) ;<br />
	}<br />
}<br />
class d1 : base1<br />
{<br />
	public void f( )<br />
	{<br />
		Console.WriteLine ( "In d1" ) ;<br />
	}<br />
}<br />
<br />
class Class1<br />
{<br />
	static void Main ( string[ ] args )<br />
	{<br />
		base1 b = new d1( ) ;<br />
		b.f( ) ;<br />
	}<br />
}<br />

which yeailds In base1
it says base1 b = new d1()
1)why did it mix 2 classes??can we do that?why would we wanan do that??
when called b.f() - f of base1 is called!WTF | :WTF:
2)why is that so?

tks a lot for any help..appreciate it..

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

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 
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 

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.