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

C#

 
GeneralRe: Class Libraries Pin
Poolee8-Dec-07 9:21
Poolee8-Dec-07 9:21 
GeneralRe: Class Libraries Pin
Ravi Bhavnani8-Dec-07 9:23
professionalRavi Bhavnani8-Dec-07 9:23 
GeneralRe: Class Libraries Pin
Poolee8-Dec-07 9:28
Poolee8-Dec-07 9:28 
Questionselectively passing different classes to a function - C# Pin
karthikde19808-Dec-07 7:19
karthikde19808-Dec-07 7:19 
GeneralRe: selectively passing different classes to a function - C# Pin
karthikde19808-Dec-07 8:49
karthikde19808-Dec-07 8:49 
GeneralRe: selectively passing different classes to a function - C# Pin
Christian Graus8-Dec-07 9:07
protectorChristian Graus8-Dec-07 9:07 
GeneralRe: selectively passing different classes to a function - C# Pin
Christian Graus8-Dec-07 9:05
protectorChristian Graus8-Dec-07 9:05 
QuestionRe: selectively passing different classes to a function - C# Pin
karthikde19808-Dec-07 10:05
karthikde19808-Dec-07 10:05 
Dear Mr. Graus,

Thanks for ur reply. Actually, the function xyz() is presently located in the three child classes child1, child2 & child3 and working alright. What I want to do is, to move this xyz() function into the base class "common", so that all the 3 child classes can access the function from the baseclass.

When I have physically moved the function xyz() to the "common" baseclass, the child classes child1, child2 & child3 would have no problem calling this function in the baseclass and pass the appropriate class (that is, one of state1, state2 or state3) as argument, depending on who is calling the function. But the problem arises when I try to create the objects of the class state1 or state2 or state3 inside the xyz() function in the baseclass.

for example, If I create object for state1 inside the Function, it will work only for state1 but will not work for state2 or state3 as arguments, called from child2 or child3 respectively. How can I write a code in the baseclass that accepts any one of state1, state2 or state3 as arguments?

Thanks for your reply and help.

Greetings,
Karthik
GeneralRe: selectively passing different classes to a function - C# Pin
Christian Graus8-Dec-07 10:36
protectorChristian Graus8-Dec-07 10:36 
GeneralTCP/IP Sockets Pin
half-life8-Dec-07 6:42
half-life8-Dec-07 6:42 
GeneralRe: TCP/IP Sockets Pin
Kristian Sixhøj8-Dec-07 6:45
Kristian Sixhøj8-Dec-07 6:45 
GeneralRe: TCP/IP Sockets Pin
half-life8-Dec-07 6:55
half-life8-Dec-07 6:55 
GeneralRe: TCP/IP Sockets [modified] Pin
Kristian Sixhøj8-Dec-07 7:07
Kristian Sixhøj8-Dec-07 7:07 
GeneralRe: TCP/IP Sockets Pin
half-life8-Dec-07 8:46
half-life8-Dec-07 8:46 
GeneralGetting Data from DataReader Pin
tr_thorn8-Dec-07 2:55
tr_thorn8-Dec-07 2:55 
GeneralRe: Getting Data from DataReader Pin
Ennis Ray Lynch, Jr.8-Dec-07 3:12
Ennis Ray Lynch, Jr.8-Dec-07 3:12 
GeneralRe: Getting Data from DataReader Pin
half-life8-Dec-07 6:38
half-life8-Dec-07 6:38 
GeneralGet Data From Data Reader! Pin
tr_thorn8-Dec-07 2:55
tr_thorn8-Dec-07 2:55 
Generalsolution for primary key Pin
sajid.salim.khan8-Dec-07 2:45
sajid.salim.khan8-Dec-07 2:45 
GeneralRe: solution for primary key Pin
Ennis Ray Lynch, Jr.8-Dec-07 2:51
Ennis Ray Lynch, Jr.8-Dec-07 2:51 
GeneralRe: solution for primary key Pin
Mark Churchill9-Dec-07 3:38
Mark Churchill9-Dec-07 3:38 
GeneralSorting an Array Pin
electriac8-Dec-07 1:37
electriac8-Dec-07 1:37 
GeneralRe: Sorting an Array Pin
Anthony Mushrow8-Dec-07 2:07
professionalAnthony Mushrow8-Dec-07 2:07 
GeneralRe: Sorting an Array Pin
electriac8-Dec-07 2:17
electriac8-Dec-07 2:17 
GeneralRe: Sorting an Array [modified] Pin
Anthony Mushrow8-Dec-07 2:25
professionalAnthony Mushrow8-Dec-07 2:25 

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.