Please note that this is an “Intermediate” article; it therefore assumes you have read all previous “Beginner” articles, and you know how to create an instance of a class. Introduction Generics allow a type or method to operate on objects of varying types, while providing compile-time type safety. They can be used to achieve parametric … Read More →
Note: This article assumes that you have read all previous “Beginner” articles, and you know how to create an instance of a class. Introduction Operator Overloading is a feature of C# that acts as syntactic sugar in the code, and eases the use of libraries in your programs. Because this feature is not present in … Read More →
Introduction When coding, I find that properties are a simple, yet useful, feature of the C# programming language. Properties enable the use of member syntax for setters and getters. With properties, you can read, write, or compute the value of a private field very flexibly. If you have used C++ or Java in the past, … Read More →
Introduction Officially, Java and C# do not support true multiple inheritance (or “MI”). In other words, classes belong to a single-rooted object, and can inherit from only one parent class. Keep in mind that interfaces can still be inherited multiple times by a class. The reason Java and C# give for not supporting MI is … Read More →
Please note that this article assumes you have read my previous tutorials on classes, and you know how to create an instance of a class. Introduction In my previous article, I mentioned that methods (functions defined in a given class) marked as public are the only methods visible to the entire program. On the other … Read More →
Please note that this article assumes you have read my previous posts on data types, variables, conditionals and loops, classes, etc. and you are able to write a running Hello, World! program. Please do these before trying to create another DOOM or Crysis. Introduction A function is a way of packaging code that does something. … Read More →
Please note that this article assumes you have read my previous posts on data types, variables, conditionals and loops, etc. and you are able to write a running Hello, World! program. Introduction In Object-Oriented Programming (OOP), the most important concept is the class. As its name implied, this is especially the case in class-based OOP, … Read More →
No, I’m not referring to a common brand of mouthwash. In programming, “Scope” refers to the visibility of a variable, as seen from different locations of a program. Not all variables and objects are available for use by any procedure; that would be akin to a hotel room that leaves all of its doors unlocked, … Read More →
In my previous post Basic Concepts – Part 2, I went over three common types of variables: Integer, String, and Double. In this post, I intend to go over all of the intrinsic data types available to you in C#. Many of these translate to Java, C++, and even other languages like Visual Basic as … Read More →
You may be wondering what I am talking about. You have probably seen a loaf of bread, sliced up and packaged by the marketplace – neatly arranged in a plastic enclosure of some sort. Then you have probably seen a plate of spaghetti, tangled and restless on your fine china. Spaghetti Code is an old … Read More →