Click here to Skip to main content
15,886,725 members
Home / Discussions / C#
   

C#

 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
EEmaan27-Apr-07 0:48
EEmaan27-Apr-07 0:48 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Arun.Immanuel27-Apr-07 1:22
Arun.Immanuel27-Apr-07 1:22 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 1:30
protectorChristian Graus27-Apr-07 1:30 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 1:23
protectorChristian Graus27-Apr-07 1:23 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
EEmaan27-Apr-07 1:39
EEmaan27-Apr-07 1:39 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
Christian Graus27-Apr-07 1:50
protectorChristian Graus27-Apr-07 1:50 
GeneralRe: Plzzzzzzzzzzzzzzzzzzzzzzzzzz Help in form closing Pin
ChandraRam27-Apr-07 2:57
ChandraRam27-Apr-07 2:57 
Questionuse of assigning the object impelementing a interface to an interface [modified] Pin
sishya26-Apr-07 23:45
sishya26-Apr-07 23:45 
Hi guys ,
I came across a piece of code similar to the below one.

public partial class Form1 : Form
{
private void Form1_Load(object sender, EventArgs e)
{
ad test = new ad();
Ia id5 = test.testobj();
id5.display()
}
}

public interface Ia
{
void display();
}
public class b : Ia
{
public void display()
{
MessageBox.Show("do it man");
}
}

public class ad
{
public Ia testobj()
{
b gh = new b();
return gh;

}
}

My question is why should we typecast object gh to interface Ia in testobj() function as the interface object when we can directly use the object of class b to call display function.

Thans in advance,
sishya


-- modified at 5:54 Friday 27th April, 2007
AnswerRe: use of assigning the object impelementing a interface to an interface Pin
Christian Graus27-Apr-07 0:02
protectorChristian Graus27-Apr-07 0:02 
AnswerRe: use of assigning the object impelementing a interface to an interface Pin
GregD29-Apr-07 2:08
GregD29-Apr-07 2:08 
QuestionWebbased SQL Query Analyzer? Pin
Succodimele26-Apr-07 23:37
Succodimele26-Apr-07 23:37 
AnswerRe: Webbased SQL Query Analyzer? Pin
Christian Graus26-Apr-07 23:47
protectorChristian Graus26-Apr-07 23:47 
GeneralRe: Webbased SQL Query Analyzer? Pin
Succodimele26-Apr-07 23:56
Succodimele26-Apr-07 23:56 
GeneralRe: Webbased SQL Query Analyzer? Pin
Christian Graus27-Apr-07 0:03
protectorChristian Graus27-Apr-07 0:03 
GeneralRe: Webbased SQL Query Analyzer? Pin
Succodimele27-Apr-07 0:58
Succodimele27-Apr-07 0:58 
GeneralRe: Webbased SQL Query Analyzer? Pin
Succodimele27-Apr-07 1:41
Succodimele27-Apr-07 1:41 
QuestionNeed to know how can i create Tree view control with header in WinForm in C#.... Pin
Yanshof26-Apr-07 23:10
Yanshof26-Apr-07 23:10 
AnswerRe: Need to know how can i create Tree view control with header in WinForm in C#.... Pin
Christian Graus26-Apr-07 23:25
protectorChristian Graus26-Apr-07 23:25 
GeneralRe: Need to know how can i create Tree view control with header in WinForm in C#.... Pin
Yanshof27-Apr-07 5:04
Yanshof27-Apr-07 5:04 
GeneralRe: Need to know how can i create Tree view control with header in WinForm in C#.... Pin
Christian Graus27-Apr-07 12:44
protectorChristian Graus27-Apr-07 12:44 
GeneralRe: Need to know how can i create Tree view control with header in WinForm in C#.... Pin
Yanshof28-Apr-07 2:47
Yanshof28-Apr-07 2:47 
GeneralRe: Need to know how can i create Tree view control with header in WinForm in C#.... Pin
Christian Graus28-Apr-07 12:12
protectorChristian Graus28-Apr-07 12:12 
GeneralRe: Need to know how can i create Tree view control with header in WinForm in C#.... Pin
PIEBALDconsult3-May-07 17:00
mvePIEBALDconsult3-May-07 17:00 
QuestionHow to copy ICollection object contents to List ? Pin
kumar.bs26-Apr-07 22:59
kumar.bs26-Apr-07 22:59 
AnswerRe: How to copy ICollection object contents to List ? Pin
Christian Graus26-Apr-07 23:06
protectorChristian Graus26-Apr-07 23:06 

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.