The colon is necessary to indicate parameters. In C# 4.0, you can re-order and name your parameters, optionally, but the variable name must match the prototype and have the colon postfix.
public void Test(string something1, string something2)
{
}
can be called as:
Test(something2: "bar", something1: "foo");
if you want
Related Contents:
- What are the true benefits of ExpandoObject?
- How to easily initialize a list of Tuples?
- When should TaskCompletionSource be used?
- C# binary literals
- Best way to split string into lines
- Why was the statement (j++); forbidden?
- .NET console application as Windows service
- In c# what does ‘where T : class’ mean?
- How do I check if a property exists on a dynamic anonymous type in c#?
- Start may not be called on a promise-style task. exception is coming
- C# operator overload for `+=`?
- Conditional compilation and framework targets
- How to clear MemoryCache?
- read string from .resx file in C#
- How to flatten tree via LINQ?
- The quest for the Excel custom function tooltip
- Why can I create a class named “var”?
- Is there an “opposite” to the null coalescing operator? (…in any language?)
- C# Syntax – Split String into Array by Comma, Convert To Generic List, and Reverse Order
- Is there a Task based replacement for System.Threading.Timer?
- What does the ‘=>’ syntax in C# mean?
- Concurrent Dictionary Correct Usage
- Exception: “URI formats are not supported”
- Is there a difference between return myVar vs. return (myVar)?
- Get property value from C# dynamic object by string (reflection?)
- Why does C# allow {} code blocks without a preceding statement?
- Cannot install windows service
- What is C# ‘internal’ in VB.net?
- Using multiple instances of MemoryCache
- How to abort a Task like aborting a Thread (Thread.Abort method)?
- Does C# 7.0 work for .NET 4.5?
- Very High Memory Usage in .NET 4.0
- Why is Main method private?
- Best syntax for a = (x == null) ? null : x.func()
- Show Dialog box at center of its parent
- int.TryParse syntatic sugar
- Is there an elegant way to repeat an action?
- How to get notification that a System.Threading.Tasks.Task has completed
- Covariance and IList
- What is point of SSL if fiddler 2 can decrypt all calls over HTTPS?
- Mixed mode assembly is built against version ‘v1.1.4322’
- Dynamically implementing an interface in .NET 4.0 (C#)
- InvalidOperationException in my Lazy value factory
- Is there a way to do a PUT with WebClient?
- Difference between ElapsedTicks, ElapsedMilliseconds, Elapsed.Milliseconds and Elapsed.TotalMilliseconds? (C#)
- When to use Partitioner class?
- Illegal characters in path when loading a string with XDocument
- How to make LINQ’s Max-function return the default value if the sequence is empty?
- How do I clear a System.Runtime.Caching.MemoryCache
- LINQ SelectMany and Where extension method ignoring nulls