Blog Archives

CROSS APPLY Operator

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

Posted in Uncategorized

SQL Server – User Defined Table Types

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

Posted in Uncategorized

Clustered & Non Clustered Indexes in SQL Server

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

Posted in Uncategorized

Polymorphism

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

Posted in Uncategorized

Encapsulation

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

Posted in Uncategorized

Inheritance

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

Posted in Uncategorized

Access Modifiers

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 –

Posted in Uncategorized

Thread Signaling via WaitHandles – AutoResetEvent

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

Posted in Uncategorized

Is As Operators

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

Posted in Uncategorized

Reference Conversions, Upcasting & Downcasting

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

Posted in Uncategorized
Design a site like this with WordPress.com
Get started