Named and Optional Parameters in .Net 4.0
By [)ia6l0 iii
Named and optional parameters is a new concept introduced in 4.0.
The Named Parameters allow you to pass arguments by parameter name instead of parameter position in the signature.
Optional Parameters allow parameters to be specified as optional by providing a default value for them in a member declaration. When the member is invoked, optional arguments can be omitted.
Related FAQs
You can truncate the file paths using the Shell LightWeight library.
The IndexOf method in C# is case -sensitive. However, you can use the CompareInto class to make it insensitive to case.
Use the Environment class to get important and user-specific properties like the User Profile folder.
You can use the Visual Studio's watch window to edit the values of the variables at run time.
You can drag and drop statements in watch window, and the windows will evaluate the statement.
Named and Optional Parameters in .Net 4.0 (751 Views)