Click here to Skip to main content
15,911,039 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: C# - Implicitly typed local variables Pin
Colin Angus Mackay14-Nov-07 5:33
Colin Angus Mackay14-Nov-07 5:33 
Skippums wrote:
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.


The thing is the compiler has to know the type. If it isn't an anoymous type (where the actual type is known only to the compiler) then you and the compiler should know the same thing. (I wrote a blog entry on what happens under the hood with anonymous types[^])


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


I don't have VS2008 in front of me, but I doubt that is possible. The cast must be a literal or known at compiler time. This isn't.




Upcoming FREE developer events:
* Glasgow: SQL Server Managed Objects AND Reporting Services ...

My website

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 
QuestionProblem with invoking new thread with socket parameter Pin
Coyote.Max14-Nov-07 1:09
Coyote.Max14-Nov-07 1:09 

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.