Public – Class or member can be accessed by any code. Private – Class or member can only be accessed by parent class. Protected – Class or member can only be accessed by parent class or derived class. Internal – Class or member can only be accessed by code inside the same assembly. Classes areContinue reading “C# – Accessibility Modifiers, Fields and Properties”
Monthly Archives: July 2018
C# – Creating Class Libraries and Adding Reference to Assemblies
Class Library project – creates a .dll that can be referenced in other projects. Add a reference – the FCL is split into tiny pieces and you must reference the assemblies that contains the part of the library you want to use. Right – click projects reference node in Solution Explorer, select Add Reference.
C# – Understanding Namespaces and the Unsign Directive
Namespaces disambiguate class names inside of class libraries or applications. You must reference class names by their full name. …. or, you can employ a using directive at the top of the code file to instruct the compiler to look in those namespaces to find the class that is referenced. You must always do thisContinue reading “C# – Understanding Namespaces and the Unsign Directive”
C# – Understanding .Net Framework and Compalition
Today we have a topic that we hear it all throughout the lifecycle of a software development process. The .Net Framework consists of ; Runtime (Common Language Runtime, (CLR) ‘protection buble’, manage memory, protects user’s machine, etc. .Net Framework Class Library (FCL, Base Class Library, BCL) – thousand of classes built by Microsoft for everyContinue reading “C# – Understanding .Net Framework and Compalition”
C# – Creating Class Files, Cohesive Classes and Code Navigations
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 ObjectContinue reading “C# – Creating Class Files, Cohesive Classes and Code Navigations”