Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anonymous Type - When To Use
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Anonymous Type - When To Use
Miscellaneous
Thread ID:
01462547
Message ID:
01462547
Views:
105
When would you use
var NewCust = new { CustomerId = 1, Name = "Mike Hanley" };
as opposed to
Customer NewCust = new Customer() { CustomerId = 1, Name = "Mike Hanley" };
or
var NewCust = new Customer() { CustomerId = 2, Name = "Kevin Hanley" };
The Anonymous type seems confusing.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform