...

/

Revealing the Extent of C# Vocabulary

Revealing the Extent of C# Vocabulary

Learn how to count the types and methods using code in C#.

We know there are more than 100 keywords in C#, but how many types are there? Let’s write code to determine how many types (and their methods) are available to C# in our simple console app.

Counting the types and methods

Don’t worry about exactly how this code works for now, but know that it uses a technique called reflection:

Step 1: Delete all the existing statements in Program.cs.

Step 2: We’ll start by importing the ...