Click here to Skip to main content
16,004,833 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need translation from C# to VB Pin
Dave Kreskowiak21-Sep-06 12:56
mveDave Kreskowiak21-Sep-06 12:56 
QuestionDifference between Interface and Class Pin
Nadia Monalisa20-Sep-06 4:25
Nadia Monalisa20-Sep-06 4:25 
AnswerRe: Difference between Interface and Class Pin
Jun Du20-Sep-06 4:38
Jun Du20-Sep-06 4:38 
AnswerRe: Difference between Interface and Class Pin
f*** YOU20-Sep-06 4:50
f*** YOU20-Sep-06 4:50 
GeneralRe: Difference between Interface and Class Pin
Nadia Monalisa20-Sep-06 5:51
Nadia Monalisa20-Sep-06 5:51 
AnswerRe: Difference between Interface and Class Pin
Guffa20-Sep-06 6:32
Guffa20-Sep-06 6:32 
AnswerRe: Difference between Interface and Class Pin
Jun Du20-Sep-06 7:41
Jun Du20-Sep-06 7:41 
GeneralRe: Difference between Interface and Class Pin
f*** YOU20-Sep-06 7:42
f*** YOU20-Sep-06 7:42 
An interface can be used as a type. So if you have different classes(types) and you want to do an operation on them you could do this...

//both these classes implement the ISaveAsWordDocument interface, but they are 
//totally diferent under the hood. the ISaveAsWordDocument interface defines a 
//method called Save(), all classes using this interface must implimemt that
//method and it is expected to save its contents to a word document.

ISaveAsWordDocument[] docs = new ISaveAsWordDocument[3];

//LotsOfText, GraphsAndStuff, and Book implement("inherit") the
//ISaveAsWordDocumnet interface
docs[0] = new LotsOfText();
docs[1] = new GraphsAndStuff();
docs[2] = new Book();

//as you can see interfaces allow you to do operations an ANY type that
//implements that interface, no casting or anything like that is needed.
foreach(ISaveAsWordDocument doc in docs)
 doc.Save("document ... .doc");


static int Sqrt(int x) { if (x<0) throw new ArgumentOutOfRangeException(); int temp, y=0, b=0x8000, bshft=15, v=x; do { if (v>=(temp=(y<<1)+b<<bshft--)) {="" y+="b;" v-="temp;" }="" while="" ((b="">>=1)>0); return y; OMG | :OMG:

Questionusing .Net component in unmanaged component without registrying Pin
nadeemahmad20-Sep-06 4:20
nadeemahmad20-Sep-06 4:20 
QuestionSQLite or SQL Server Everywhere ! Which one is better !? Pin
Nadia Monalisa20-Sep-06 4:17
Nadia Monalisa20-Sep-06 4:17 
AnswerRe: SQLite or SQL Server Everywhere ! Which one is better !? Pin
Member 9620-Sep-06 7:07
Member 9620-Sep-06 7:07 
QuestionHow do I make Dropshadow on a UserControl Pin
Jan-Erik Romoeren20-Sep-06 4:14
Jan-Erik Romoeren20-Sep-06 4:14 
Questiondatagrid fill in complete area Pin
Amar Chaudhary20-Sep-06 4:08
Amar Chaudhary20-Sep-06 4:08 
Question.NET Framework Pin
kalyanPaladugu20-Sep-06 3:59
kalyanPaladugu20-Sep-06 3:59 
AnswerRe: .NET Framework Pin
kalyanPaladugu20-Sep-06 5:13
kalyanPaladugu20-Sep-06 5:13 
Questionhow to put a string in an array Pin
faladrim20-Sep-06 3:58
faladrim20-Sep-06 3:58 
AnswerRe: how to put a string in an array Pin
Coding C#20-Sep-06 4:09
Coding C#20-Sep-06 4:09 
GeneralRe: how to put a string in an array Pin
faladrim20-Sep-06 4:25
faladrim20-Sep-06 4:25 
GeneralRe: how to put a string in an array Pin
faladrim20-Sep-06 4:34
faladrim20-Sep-06 4:34 
GeneralRe: how to put a string in an array Pin
Coding C#20-Sep-06 4:40
Coding C#20-Sep-06 4:40 
QuestionHow to upload file to HTTPS site Pin
tb6020-Sep-06 3:47
tb6020-Sep-06 3:47 
QuestionRemote Debugging [modified] ..am i in the right forum ??? Pin
iqazi20-Sep-06 3:23
iqazi20-Sep-06 3:23 
QuestionHow to modify the data in xml file? Pin
CooperWu20-Sep-06 3:22
CooperWu20-Sep-06 3:22 
AnswerRe: How to modify the data in xml file? Pin
CooperWu20-Sep-06 3:34
CooperWu20-Sep-06 3:34 
AnswerRe: How to modify the data in xml file? Pin
Stefan Troschuetz20-Sep-06 3:38
Stefan Troschuetz20-Sep-06 3:38 

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.