Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
GeneralRe: About ReportViewer in c# Pin
Justin Perez14-Nov-07 4:51
Justin Perez14-Nov-07 4:51 
QuestionDataSet XML Pin
jamesorm14-Nov-07 3:17
jamesorm14-Nov-07 3:17 
AnswerRe: DataSet XML Pin
Justin Perez14-Nov-07 4:43
Justin Perez14-Nov-07 4:43 
GeneralRe: DataSet XML Pin
jamesorm14-Nov-07 5:13
jamesorm14-Nov-07 5:13 
QuestionC# - Implicitly typed local variables Pin
Michael Sync14-Nov-07 3:16
Michael Sync14-Nov-07 3:16 
AnswerRe: C# - Implicitly typed local variables Pin
Colin Angus Mackay14-Nov-07 4:27
Colin Angus Mackay14-Nov-07 4:27 
GeneralRe: C# - Implicitly typed local variables Pin
Michael Sync14-Nov-07 15:40
Michael Sync14-Nov-07 15:40 
AnswerRe: C# - Implicitly typed local variables Pin
Skippums14-Nov-07 4:33
Skippums14-Nov-07 4:33 
I see it as being handy when you create a new object of some type using reflection, when you don't know the type beforehand. Then, you have a strongly typed variable instead of just the interface or an object to work with. For example, lets say I implement a class that doesn't implement IList, but it comes close. So I write a method that takes an object, but the object must have an "Add" method. I think var may be helpful in this case, but only if you can do the following with it...

public void SomeMethod(object someObject) {
var foo = (someObject.GetType())someObject;
foo.Add(...);
}

As for the second question, you would have to explicitly state what type of variable it is. So you would have to say something like...

var f = 1f; // float
var u = (uint)1;
var l = (long)1;
etc.

Jeff
GeneralRe: C# - Implicitly typed local variables Pin
Colin Angus Mackay14-Nov-07 5:33
Colin Angus Mackay14-Nov-07 5:33 
GeneralRe: C# - Implicitly typed local variables Pin
Michael Sync14-Nov-07 15:53
Michael Sync14-Nov-07 15:53 
AnswerRe: C# - Implicitly typed local variables Pin
Guffa14-Nov-07 7:52
Guffa14-Nov-07 7:52 
GeneralRe: C# - Implicitly typed local variables Pin
Michael Sync14-Nov-07 15:51
Michael Sync14-Nov-07 15:51 
QuestionAdobe PDF Pin
smarttom9914-Nov-07 3:12
smarttom9914-Nov-07 3:12 
QuestionReportViewer Properties in C# Pin
Davood Riazi14-Nov-07 3:10
Davood Riazi14-Nov-07 3:10 
AnswerRe: ReportViewer Properties in C# Pin
Abhijit Jana14-Nov-07 3:15
professionalAbhijit Jana14-Nov-07 3:15 
GeneralRe: ReportViewer Properties in C# Pin
Davood Riazi14-Nov-07 3:42
Davood Riazi14-Nov-07 3:42 
QuestionExceptions in Appdomain Pin
prasuaaron14-Nov-07 2:29
prasuaaron14-Nov-07 2:29 
QuestionC# Form and Mozilla engine Pin
springtime5414-Nov-07 2:11
springtime5414-Nov-07 2:11 
QuestionUploading Excell file to FTP Pin
Reddy Prakash14-Nov-07 1:25
Reddy Prakash14-Nov-07 1:25 
AnswerRe: Uploading Excell file to FTP Pin
Giorgi Dalakishvili14-Nov-07 1:29
mentorGiorgi Dalakishvili14-Nov-07 1:29 
GeneralRe: Uploading Excell file to FTP Pin
Reddy Prakash14-Nov-07 1:48
Reddy Prakash14-Nov-07 1:48 
AnswerRe: Uploading Excell file to FTP Pin
Guffa14-Nov-07 3:43
Guffa14-Nov-07 3:43 
GeneralRe: Uploading Excell file to FTP Pin
Reddy Prakash14-Nov-07 17:01
Reddy Prakash14-Nov-07 17:01 
QuestionHow To Start Service In Setup Application Pin
Boroumandan14-Nov-07 1:13
Boroumandan14-Nov-07 1:13 
AnswerRe: How To Start Service In Setup Application Pin
Abhijit Jana14-Nov-07 1:20
professionalAbhijit Jana14-Nov-07 1:20 

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.