Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: Excel 2003 XML Format and Images Pin
GibbleCH25-Nov-08 11:50
GibbleCH25-Nov-08 11:50 
GeneralRe: Excel 2003 XML Format and Images Pin
Dave Kreskowiak25-Nov-08 15:06
mveDave Kreskowiak25-Nov-08 15:06 
GeneralRe: Excel 2003 XML Format and Images Pin
GibbleCH25-Nov-08 15:11
GibbleCH25-Nov-08 15:11 
QuestionAbout Interfaces Pin
mdkarimulla25-Nov-08 3:24
mdkarimulla25-Nov-08 3:24 
AnswerRe: About Interfaces Pin
PIEBALDconsult25-Nov-08 3:27
mvePIEBALDconsult25-Nov-08 3:27 
GeneralRe: About Interfaces Pin
mdkarimulla25-Nov-08 3:35
mdkarimulla25-Nov-08 3:35 
GeneralRe: About Interfaces Pin
HosamAly25-Nov-08 3:44
HosamAly25-Nov-08 3:44 
GeneralRe: About Interfaces Pin
Mbah Dhaim25-Nov-08 4:33
Mbah Dhaim25-Nov-08 4:33 
interface is like "template" for your class, if your classes implement that interface, both of your classes must implement all methods and properties defined in it.
so if your "class one" have some methods other than defined in the interface and these methods only use for "class one" then just add them in "class one" and no need to create them in your interface, vice versa.
But you must be aware for casting that object. i.e:
public inteface MyInterface{
void IntefaceMethod();
}
public class ClassOne : myInterface
{
 public void IntefaceMethod(){
 } 
 ///a method that defined only in this class
 public void ClassOneMethod(){
 }
}
public class ClassTwo : myInterface
{
 public void IntefaceMethod(){
 } 
 ///a method that defined only in this class
 public void ClassTwoMethod(){
 }
}

MyInterface one = new ClassOne();
MyInterface two = new ClassTwo();

one.IntefaceMethod();
two.IntefaceMethod();

((ClassOne)one).ClassOneMethod();
((ClassTwo)two).ClassTwoMethod();

/*
this will throw exception
((ClassTwo)one).ClassOneMethod();
((ClassOne)two).ClassTwoMethod();
*/


hope it helps

dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support



GeneralRe: About Interfaces Pin
PIEBALDconsult25-Nov-08 6:37
mvePIEBALDconsult25-Nov-08 6:37 
AnswerRe: About Interfaces Pin
dan!sh 25-Nov-08 3:57
professional dan!sh 25-Nov-08 3:57 
AnswerRe: About Interfaces PinPopular
Thomas Weller25-Nov-08 3:59
Thomas Weller25-Nov-08 3:59 
AnswerRe: About Interfaces Pin
Ben Fair25-Nov-08 4:27
Ben Fair25-Nov-08 4:27 
QuestionCould the GC collect a static variable? Pin
HosamAly25-Nov-08 3:15
HosamAly25-Nov-08 3:15 
AnswerRe: Could the GC collect a static variable? Pin
N a v a n e e t h25-Nov-08 3:22
N a v a n e e t h25-Nov-08 3:22 
GeneralRe: Could the GC collect a static variable? Pin
HosamAly25-Nov-08 3:23
HosamAly25-Nov-08 3:23 
QuestionRe: Could the GC collect a static variable? Pin
HosamAly25-Nov-08 3:40
HosamAly25-Nov-08 3:40 
AnswerRe: Could the GC collect a static variable? Pin
Simon P Stevens25-Nov-08 4:10
Simon P Stevens25-Nov-08 4:10 
GeneralRe: Could the GC collect a static variable? Pin
HosamAly25-Nov-08 20:15
HosamAly25-Nov-08 20:15 
GeneralRe: Could the GC collect a static variable? Pin
Simon P Stevens25-Nov-08 22:30
Simon P Stevens25-Nov-08 22:30 
GeneralRe: Could the GC collect a static variable? Pin
HosamAly28-Nov-08 21:56
HosamAly28-Nov-08 21:56 
QuestionWebRequest.RequestUri Pin
Thekaninos25-Nov-08 2:39
Thekaninos25-Nov-08 2:39 
AnswerRe: WebRequest.RequestUri Pin
Ravi Bhavnani25-Nov-08 2:47
professionalRavi Bhavnani25-Nov-08 2:47 
AnswerRe: WebRequest.RequestUri Pin
Giorgi Dalakishvili25-Nov-08 2:48
mentorGiorgi Dalakishvili25-Nov-08 2:48 
AnswerRe: WebRequest.RequestUri Pin
Pr@teek B@h!25-Nov-08 3:21
Pr@teek B@h!25-Nov-08 3:21 
AnswerRe: WebRequest.RequestUri Pin
Thekaninos25-Nov-08 3:30
Thekaninos25-Nov-08 3:30 

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.