Click here to Skip to main content
15,915,164 members
Home / Discussions / C#
   

C#

 
GeneralRe: #include or including files Pin
PIEBALDconsult23-Mar-10 18:23
mvePIEBALDconsult23-Mar-10 18:23 
AnswerRe: #include or including files Pin
Dr.Walt Fair, PE23-Mar-10 17:32
professionalDr.Walt Fair, PE23-Mar-10 17:32 
AnswerRe: #include or including files Pin
PIEBALDconsult23-Mar-10 18:20
mvePIEBALDconsult23-Mar-10 18:20 
GeneralRe: #include or including files Pin
Luc Pattyn23-Mar-10 18:24
sitebuilderLuc Pattyn23-Mar-10 18:24 
GeneralRe: #include or including files Pin
prithaa23-Mar-10 18:32
prithaa23-Mar-10 18:32 
GeneralRe: #include or including files Pin
PIEBALDconsult24-Mar-10 4:31
mvePIEBALDconsult24-Mar-10 4:31 
QuestionBest C# book for Reference Pin
sebogawa23-Mar-10 14:57
sebogawa23-Mar-10 14:57 
AnswerRe: Best C# book for Reference Pin
PIEBALDconsult23-Mar-10 16:03
mvePIEBALDconsult23-Mar-10 16:03 
AnswerRe: Best C# book for Reference Pin
Saša Ćetković23-Mar-10 17:52
professionalSaša Ćetković23-Mar-10 17:52 
AnswerRe: Best C# book for Reference Pin
Dave Kreskowiak23-Mar-10 17:56
mveDave Kreskowiak23-Mar-10 17:56 
AnswerRe: Best C# book for Reference Pin
Ravi Bhavnani23-Mar-10 18:40
professionalRavi Bhavnani23-Mar-10 18:40 
QuestionXML but with different extension Pin
Jassim Rahma23-Mar-10 12:39
Jassim Rahma23-Mar-10 12:39 
AnswerRe: XML but with different extension Pin
Keith Barrow23-Mar-10 12:50
professionalKeith Barrow23-Mar-10 12:50 
AnswerRe: XML but with different extension Pin
PIEBALDconsult23-Mar-10 13:43
mvePIEBALDconsult23-Mar-10 13:43 
AnswerRe: XML but with different extension Pin
Dr.Walt Fair, PE23-Mar-10 13:45
professionalDr.Walt Fair, PE23-Mar-10 13:45 
QuestionCheck clipboard for a URL Pin
Jassim Rahma23-Mar-10 12:33
Jassim Rahma23-Mar-10 12:33 
AnswerRe: Check clipboard for a URL Pin
AspDotNetDev23-Mar-10 12:59
protectorAspDotNetDev23-Mar-10 12:59 
AnswerRe: Check clipboard for a URL Pin
Eslam Afifi23-Mar-10 13:02
Eslam Afifi23-Mar-10 13:02 
Questionref typecast between form derived from Form class and Form class Pin
Karismatic23-Mar-10 9:47
Karismatic23-Mar-10 9:47 
AnswerRe: ref typecast between form derived from Form class and Form class Pin
DaveyM6923-Mar-10 10:19
professionalDaveyM6923-Mar-10 10:19 
AnswerRe: ref typecast between form derived from Form class and Form class Pin
Tim Weckx23-Mar-10 10:32
Tim Weckx23-Mar-10 10:32 
GeneralRe: ref typecast between form derived from Form class and Form class Pin
Ian Shlasko23-Mar-10 11:26
Ian Shlasko23-Mar-10 11:26 
GeneralRe: ref typecast between form derived from Form class and Form class Pin
AspDotNetDev23-Mar-10 11:35
protectorAspDotNetDev23-Mar-10 11:35 
Ian Shlasko wrote:
except that "out" only works in one direction, while "ref" both provides a value and allows it to be changed.


Not quite. The only difference between ref and out is that out ensures the value will be set before you return from the method. When ref is used, it does not ensure the variable will be set... it merely allows it. This allows for one to do something like this:
C#
// Notice myForm was not initialized.
Form myForm;
SomeMethod(out myForm);
// This will work.
myForm.ShowDialog();

Notice how this differs from ref:
C#
// Notice myForm was not initialized.
Form myForm;
SomeMethod(ref myForm);
// This will NOT work (compile time error), because myForm may not have been initialized.
myForm.ShowDialog();


GeneralRe: ref typecast between form derived from Form class and Form class Pin
Ian Shlasko23-Mar-10 12:00
Ian Shlasko23-Mar-10 12:00 
GeneralRe: ref typecast between form derived from Form class and Form class Pin
Karismatic23-Mar-10 17:47
Karismatic23-Mar-10 17:47 

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.