Click here to Skip to main content
15,896,201 members
Home / Discussions / C#
   

C#

 
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 
hi..if you have some free time, i'd appreciate if you can please help me.
please consider the following code :
class sample<br />
{<br />
	protected int i ;<br />
	public sample( )<br />
	{<br />
		i = 10 ;<br />
	}<br />
}<br />
class sample1 : sample<br />
{<br />
	public sample1( )<br />
	{<br />
		Console.Write ("Hello " + i ) ;<br />
	}<br />
}<br />
class Class1<br />
{<br />
	static void Main ( string[ ] args )<br />
	{<br />
		sample1 s = new sample1( ) ;<br />
	}<br />
}

which yeilds the result : Hello 10

my prob : AS I CAN UNDERSTAND : in above case the derieved class is accessing the protected attribute of the base class... but i thought in CS that wasn't supposed to happen..Confused | :confused:
OR am i looking at it wrongly??Frown | :(
pls help..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: 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 
AnswerRe: How can I change memory with IntPtr Pin
Corinna John6-Nov-03 0:58
Corinna John6-Nov-03 0:58 
GeneralAnimated/skinned mesh in C# Pin
bjoernen5-Nov-03 21:38
bjoernen5-Nov-03 21:38 
GeneralRe: Animated/skinned mesh in C# Pin
nematzade23-May-10 5:51
nematzade23-May-10 5:51 
GeneralEmbedded Icons and ImageList Pin
pnolan5-Nov-03 20:19
pnolan5-Nov-03 20:19 
GeneralRe: Embedded Icons and ImageList Pin
Heath Stewart6-Nov-03 4:07
protectorHeath Stewart6-Nov-03 4:07 
GeneralDataGrid Column Resize Pin
pnolan5-Nov-03 20:15
pnolan5-Nov-03 20:15 

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.