O'Reilly logo

C# Design Patterns: A Tutorial by James W. Cooper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required