Click here to Skip to main content
15,886,109 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionGridview with checkboxes Pin
Michael Clinton28-Aug-17 12:52
Michael Clinton28-Aug-17 12:52 
Questionregarding asp.net Pin
Member 1337387327-Aug-17 20:58
Member 1337387327-Aug-17 20:58 
AnswerRe: regarding asp.net Pin
Member 1326737028-Aug-17 21:22
Member 1326737028-Aug-17 21:22 
Questionregarding asp.net Pin
Member 1337387327-Aug-17 20:56
Member 1337387327-Aug-17 20:56 
QuestionMessage Closed Pin
23-Aug-17 18:39
lanphuonglien23-Aug-17 18:39 
AnswerRe: AngularJS 2.0 with MVVM and C# Pin
Richard MacCutchan23-Aug-17 21:19
mveRichard MacCutchan23-Aug-17 21:19 
QuestionTrying to download code using GitExtensions Pin
indian14323-Aug-17 7:05
indian14323-Aug-17 7:05 
QuestionTypeError: $(...).autocomplete is not a function Pin
rashmirashmijoshi61@gmail.com23-Aug-17 2:29
rashmirashmijoshi61@gmail.com23-Aug-17 2:29 
Questionc# crystal report asp.net Pin
linanina22-Aug-17 22:47
linanina22-Aug-17 22:47 
QuestionApplication Security Testing Tool to Check Security Vulnerability Pin
Member 1157377319-Aug-17 19:34
Member 1157377319-Aug-17 19:34 
QuestionObject does not contain definition for substring. Pin
samflex18-Aug-17 4:47
samflex18-Aug-17 4:47 
AnswerRe: Object does not contain definition for substring. Pin
Luc Pattyn18-Aug-17 5:12
sitebuilderLuc Pattyn18-Aug-17 5:12 
GeneralRe: Object does not contain definition for substring. Pin
User 1013254622-Aug-17 3:52
User 1013254622-Aug-17 3:52 
GeneralRe: Object does not contain definition for substring. Pin
Luc Pattyn22-Aug-17 3:58
sitebuilderLuc Pattyn22-Aug-17 3:58 
GeneralRe: Object does not contain definition for substring. Pin
User 1013254622-Aug-17 5:12
User 1013254622-Aug-17 5:12 
GeneralRe: Object does not contain definition for substring. Pin
Luc Pattyn22-Aug-17 7:00
sitebuilderLuc Pattyn22-Aug-17 7:00 
GeneralRe: Object does not contain definition for substring. Pin
ZurdoDev22-Aug-17 4:44
professionalZurdoDev22-Aug-17 4:44 
GeneralRe: Object does not contain definition for substring. Pin
User 1013254622-Aug-17 5:11
User 1013254622-Aug-17 5:11 
GeneralRe: Object does not contain definition for substring. Pin
Richard Deeming22-Aug-17 7:58
mveRichard Deeming22-Aug-17 7:58 
SerenityNowDev wrote:
There is when you know what the type is.

Are you missing a "don't" from that sentence?
C#
// No choice - using an anonymous type:
var foo = new { Key = 42, Text = "The answer" };


// Perfectly fine - you *do* know what the type is, and there's no need to repeat it:
var cache = new Dictionary<Foo, Bar>(); 


// OK-ish - the type probably isn't that important:
var groupedList = contacts.GroupBy(c => c.Company);
// would be: IEnumerable<IGrouping<Comany, Contact>>
// but more fiendish types are possible with LINQ.


// Bad - you *do* know what the type is, but the cast isn't necessary:
var lookup = (IDictionary<Foo, Bar>)new Dictionary<Foo, Bar>();
// should be: IDictionary<Foo, Bar> lookup = new Dictionary<Foo, Bar>();


// Terrible - you *don't* know what the type is without finding the method:
var bar = Wibble(); 


// Lazy - you can probably guess what the type is, but would be better to be explicit:
var s = "Hello";

Or were you suggesting that var should only ever be used for anonymous types?



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Object does not contain definition for substring. Pin
ZurdoDev22-Aug-17 8:04
professionalZurdoDev22-Aug-17 8:04 
AnswerRe: Object does not contain definition for substring. Pin
Richard Deeming18-Aug-17 5:36
mveRichard Deeming18-Aug-17 5:36 
GeneralRe: Object does not contain definition for substring. Pin
samflex18-Aug-17 8:29
samflex18-Aug-17 8:29 
GeneralRe: Object does not contain definition for substring. Pin
Richard Deeming18-Aug-17 8:46
mveRichard Deeming18-Aug-17 8:46 
GeneralRe: Object does not contain definition for substring. Pin
samflex18-Aug-17 8:58
samflex18-Aug-17 8:58 
GeneralRe: Object does not contain definition for substring. Pin
Richard Deeming21-Aug-17 0:32
mveRichard Deeming21-Aug-17 0:32 

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.