It’s not equivalent, but would this syntax work for you?
Animal a = new Animal()
{
SpeciesName = "Lion",
IsHairy = true,
NumberOfLegs = 4
};
More Related Contents:
- How to enable assembly bind failure logging (Fusion) in .NET
- How can I add user-supplied input to an SQL statement?
- Download Excel file via AJAX MVC
- How do I convert Word files to PDF programmatically? [closed]
- Why is Dictionary preferred over Hashtable in C#?
- ObservableCollection Doesn’t support AddRange method, so I get notified for each item added, besides what about INotifyCollectionChanging?
- How can I read a file even when getting an “in use by another process” exception?
- How to solve COM Exception Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))?
- How to fix a opacity bug with DrawToBitmap on WebBrowser Control?
- Bind to SelectedItems from DataGrid or ListBox in MVVM
- Why use String.Format? [duplicate]
- .NET Integer vs Int16?
- Colour Individual Items in a winforms ComboBox?
- Is there any way to embed power bi reports and dashboards in vb.net or C# desktop application with sql server 2008 database?
- Checking file/folder access permission
- Getting hash of a list of strings regardless of order
- User Activity Logging, Telemetry (and Variables in Global Exception Handlers)
- Event Signature in .NET — Using a Strong Typed ‘Sender’? [closed]
- return only Digits 0-9 from a String
- The remote server returned an unexpected response: (413) Request Entity Too Large.
- How do I get the currently loggedin Windows account from an ASP.NET page?
- Finding all Namespaces in an assembly using Reflection (DotNET)
- How do I get my C# program to sleep for 50 milliseconds?
- MS Chart Rectangular Annotation width in percent and not pixel
- Consume a SOAP web service without relying on the app.config
- What do ref, val and out mean on method parameters?
- Converting c# eventhandler code to vb.net
- Select distinct rows from datatable in Linq
- Creating download link to a file on a file server
- Are there any OK image recognition libraries for .NET?