Click here to Skip to main content
16,014,568 members
Home / Discussions / C#
   

C#

 
Generalomg, what a cry baby! Pin
Anonymous27-Jul-05 11:45
Anonymous27-Jul-05 11:45 
GeneralRe: omg, what a cry baby! Pin
Guffa27-Jul-05 23:59
Guffa27-Jul-05 23:59 
QuestionHow can I.. Pin
KORCARI27-Jul-05 9:54
KORCARI27-Jul-05 9:54 
AnswerRe: How can I.. Pin
Alomgir Miah27-Jul-05 10:32
Alomgir Miah27-Jul-05 10:32 
GeneralRegular Expression Pin
eggie527-Jul-05 9:47
eggie527-Jul-05 9:47 
GeneralRe: Regular Expression Pin
Dan Neely27-Jul-05 10:38
Dan Neely27-Jul-05 10:38 
GeneralRe: Regular Expression Pin
Werdna27-Jul-05 11:13
Werdna27-Jul-05 11:13 
GeneralInheritance instances Pin
zapap27-Jul-05 9:31
zapap27-Jul-05 9:31 
Base
-------------------------
| public int iNo; |
| |
-------------------------


Class1 : Base Class2 : Base
---------------------------- --------------------------
| Class2 c2; | | private int iMyNo; |
| void Class1() | | public void SetMyNo()|
| { iNo = 10; | | { iMyNo = iNo; |
| c2 = new Class2(); | | } |
| c2.SetMyNo(); | --------------------------
| } |
----------------------------

This is my srtucture, I begin with Class1, which then init Base, and then sets iNo = 10. Next I create a new instance of Class2, which in turn again init Base. Now when I call c2.SetMyNo, it sets is to nothing, since there are two instances of Base. So how do I inherit Class2 from the same instance of Base, the super class of Class1?


There's someone in my head but it's not me - Pink Floyd
gunigugu
GeneralRe: Inheritance instances Pin
Patric_J28-Jul-05 5:10
Patric_J28-Jul-05 5:10 
GeneralRe: Inheritance instances Pin
zapap28-Jul-05 8:56
zapap28-Jul-05 8:56 
Generalcreating new desktop Pin
27-Jul-05 9:08
suss27-Jul-05 9:08 
GeneralRe: creating new desktop Pin
Sam 200627-Jul-05 14:20
Sam 200627-Jul-05 14:20 
Generalpass value from modal form Pin
Newbie_Toy27-Jul-05 8:56
Newbie_Toy27-Jul-05 8:56 
GeneralRe: pass value from modal form Pin
Libor Tinka27-Jul-05 9:11
Libor Tinka27-Jul-05 9:11 
GeneralColor Creation Pin
MarkMokris27-Jul-05 8:54
MarkMokris27-Jul-05 8:54 
GeneralRe: Color Creation Pin
Peter Vertes27-Jul-05 9:11
Peter Vertes27-Jul-05 9:11 
GeneralRe: Color Creation Pin
Libor Tinka27-Jul-05 9:15
Libor Tinka27-Jul-05 9:15 
GeneralScrolling with bitmap Pin
Yigal Agam27-Jul-05 8:45
Yigal Agam27-Jul-05 8:45 
GeneralRe: Scrolling with bitmap Pin
Libor Tinka27-Jul-05 9:19
Libor Tinka27-Jul-05 9:19 
GeneralRe: Scrolling with bitmap Pin
Yigal Agam27-Jul-05 9:28
Yigal Agam27-Jul-05 9:28 
GeneralRe: Scrolling with bitmap Pin
Libor Tinka27-Jul-05 9:53
Libor Tinka27-Jul-05 9:53 
QuestionGiant memory leaks or what? Pin
Libor Tinka27-Jul-05 8:37
Libor Tinka27-Jul-05 8:37 
AnswerRe: Giant memory leaks or what? Pin
Dave Kreskowiak27-Jul-05 8:41
mveDave Kreskowiak27-Jul-05 8:41 
GeneralRe: Giant memory leaks or what? Pin
Libor Tinka27-Jul-05 9:00
Libor Tinka27-Jul-05 9:00 
GeneralRe: Giant memory leaks or what? Pin
Libor Tinka27-Jul-05 9:04
Libor Tinka27-Jul-05 9:04 

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.