Keyword function arguments in C#

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:

Read more of this post

Elliot Balynn's Blog

A directory of wonderful thoughts

HarsH ReaLiTy

A Good Blog is Hard to Find

Software Engineering

Web development

Disparate Opinions

Various tidbits

chsakell's Blog

WEB APPLICATION DEVELOPMENT TUTORIALS WITH OPEN-SOURCE PROJECTS

Once Upon a Camayoc

Bite-size insight on Cyber Security for the not too technical.

%d bloggers like this: