Prefer more classes w/ narrowly defined responsibilities. Prefer to put each class in its own file. Prefer high cohesion – similarity singleness of purpose of the class members. To achieve high cohesion, a rule of thumb: try to make your classes fit on one “screen” of your IDE(no scrolling required). Understanding Object References and ObjectContinueContinue reading “C# – Creating Class Files, Cohesive Classes and Code Navigations”
Category Archives: Software Language
C# – Introduction to Classes and Objects
One of the main concepts which we need to know for Object Oriented Programming is classes and what kind of thing it represents in real world scenarios so we can better grasp it in a way that we understand it fully. Class is a block of code that defines a data type. An object isContinueContinue reading “C# – Introduction to Classes and Objects”
C# – Manipulating Strings
We will be exploring today ‘Manipulating Strings’ in many aspects. Escape double quotes Accessing a specific character StartsWith(), EndsWith(), Contains() Check to see if a given string has a set of characters beginning , end or somewhere inside Return true/false IndexOf() Find the index for one string inside of another string Insert(), Remove() Insert: addContinueContinue reading “C# – Manipulating Strings”
C# – Creating Methods With Output Parameters
Creating methods with output parameters allows you to return value the normal way AND return a value via method parameter
C# – Passing Named Arguments Into Input Parameters
Passing named arguments into input parameters allow us to send in parameter arguments OUT OF ORDER! We just prefix the input parameter argument with the name of the parameter we are passing in a colon then the value;