C# — The Basics

D'Arcy Draper
2 min readMar 19, 2021

--

I began my job search after graduating from a software engineering boot-camp. After hours on LinkedIn looking for new opportunities, I realized that my current knowledge alone wouldn’t help me stand out from other candidates. Here, I will outline some of the basic technical fundamentals of C# that I have learned from a free military learning resource called With You With Me so far. While I haven’t gotten far in the curriculum, I will continue my blog post series to keep track of the lessons.

Comments

Comments are blocks of information that are written by developers, for developers and will be ignored by your computer. They are designed by two backslashes (//) and are written line by line.

// This is one comment

//This is another comment

Namespaces

Namespaces can be used a few ways, but specifically, it is a declaration that is a collection of classes. It is used to keep groups of names separate from one another so that class names do not conflict if they are called the same thing. One could say its primary drive is organization. A namespace is declared by stating the keyword namespace.

namespace this_is_a_namespace {

// some code

}

Classes

Classes contain the data definitions as well as the methods that your program will use. The class keyword is used to define a class. Methods within classes define their behavior. Let’s talk more about methods…

Methods

As stated above, methods define the behavior of the classes that contain them. Classes typically contain many methods. The Main Method is the beginning point of all C# programs and it states what the class does when it is implemented.

Variables

Variables are used for storing data that we can manipulate. They contain attributes or data for a class. There are three variable types; values, references, and pointers. Value type variables can be set to a value directly and derived from the System.ValueType class. Reference type variables contain a reference to the variables, or a memory location, and not actual data that is stored in a variable. Pointer type variables store the memory address of another type of variable.

--

--

D'Arcy Draper
0 Followers

Software Engineering Student @ Flatiron Denver. Located in Austin, TX