Chapter 3. Writing Windows C# Programs

The C# language has its roots in C++, Visual Basic, and Java. Both C# and VB.Net use the same libraries and compile to the same underlying code. Both are managed languages with garbage collection of unused variable space, and both can be used interchangeably. Both also use classes with method names that are very similar to those in Java, so if you are familiar with Java, you will have no trouble with C#.

Objects in C#

In C#, everything is treated as an object. Objects contain data and have methods that operate on them. For example, strings are now objects. They have methods such as these.

Substring ToLowerCase ToUpperCase IndexOf Insert

Integers, float, and double variables are also objects, and they have ...

Get C# Design Patterns: A Tutorial now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.