Keyword function arguments in C#
December 1, 2015 Leave a comment
In this post we’ll quickly go through positional vs. keyword function arguments in C#.
Say you have the following function:
public string GetContent(bool base64encode, bool compress, bool withUniqueId, string filename, int maxSize)
{
return string.Empty;
}
You’ll learn very early in your programming class that you can call a function by supplying the arguments in exactly the same order as they are listed in the method signature. Here’s an example: