You need to combine 2 recordsets – a left-side and a right-side. You can use an inner join when both the left-side and the right-side are pre-defined. By pre-defined, I mean the the data already exists. You are just going…
You need to combine 2 recordsets – a left-side and a right-side. You can use an inner join when both the left-side and the right-side are pre-defined. By pre-defined, I mean the the data already exists. You are just going…
User-Defined Table Types New feature available in SQL Server 2008 and above. You can now pass a table into a stored procedure as a parameter. e.g. You have a List representing table row ids. You want to return a recordset…
Clustered Indexes A clustered index alters the way that the rows are stored. When you create a clustered index on a column (or a number of columns), SQL server sorts the table’s rows by that column(s). It is like a…
What is polymorphism ? Polymorphism – code reuse mechanism. You’re creating a class library. You create a class diagram in Visual Studio and add the classes and methods you think you are going to need. You notice several of your…
What is encapsulation ? Something you can do to make your code easier to maintain, debug, improve and possibly scale. How does encapsulation make your code easier to maintain, debug, improve and possibly scale ? 1. By reducing coupling between…
What is inheritance ? Inheritance in C# is the idea of designing a class that reuses the implementation of an existing class. The primary purpose of inheritance is to reuse code from an existing class. Inheritance allows you to create…
What are access modifiers ? Access modifiers control access to a type and it’s members – which types you can use, which methods you can call, which fields you can read and/or write too. There are four access modifiers –…
Thread Signaling via WaitHandles – AutoResetEvent Example Use a wait handle for signaling. Signaling occurs when one thread waits ( stays alive ) until it receives notification ( a signal ) from another thread. AutoResetEvent is the simplest type of…
As operator Use the as operator to safely downcast. Because objects are polymorphic, it is possible for a variable of a base class type to hold a derived type. To access the methods and properties of the derived type, the…
What is a reference conversion ? A reference conversion occurs when you create a object of one type and later look at as if it were another type – thru the eyes of another type, if you will. Typically, with…