Explaining Delegates in C# - Part 2 (Events)

by rahul 12/17/2008 3:39:39 AM
In my previous post, I spoke about a few very basic and simple reasons of using delegates - primarily callback. In this post, I'll talk about creating Events using delegates. I have tried to annotate the class with comments so that it is easy to comprehend. But IMHO, the best way to figure out what's going on is to copy/paste the following code and create breakpoint in the Main() class and hit F11 to step into the code. You will notice that Events are based on the Observer or Publish/Subscribe d... [More]


Explaining Delegates in C# - Part 1 (Callback and Multicast delegates)

by rahul 12/15/2008 3:00:09 PM
I hear a lot of confusion around Delegates in C#, and today I am going to give it shot of explaining the stuff with easy to understand examples. First things first... I will consciously try NOT to use any technical jargon to explain this concept. So here we go, without giving any technical explanation, let's start with a console application...// Declaration public delegate void VerySimpleDelegate(); class TestDelegate { public static void Foo() { Console.WriteLine("Foo wa... [More]


DYK #3 - How can you find out if a method/class/field was annotated with any Attributes without looking at the code?

by rahul 12/12/2008 4:52:00 AM
Well... first of all, open ILDASM and drag/drop your EXE.   The application is called Attributes, and contains an annotated class, some annotated methods and fields. Notice the .custom instance void Attributes.xxxxxxxxx highlighted above. This tells you that the class is annotated. Now, how would you tell if Bar, Foo, and FooBar methods or AttributedVar, NonAttributedVar are annotated or not? (as if the names were not self-explanatory) Double clicking on AnotherAttributedVar and NonAttri... [More]


Partition + Data recovery nightmare (Error C10000B6) - Thank God it is over!!!

by rahul 12/10/2008 2:39:15 AM
It all started last evening when I turned on my PC. I used to have a lot of partitions (Total 9) in my 2 160 GB HDD. Today when I started my PC, it showed me only 6 drives. The other HDD was present and Windows could recognize the HARD DISK. The problem was that although the Disk Management utility was showing the DISK 1 below as OFFLINE. The screenshot above shows when everything was working fine. When I saw the DISK 1 offline, I tried to bring it online but it threw an error message. I chec... [More]


You can now win with live Search - (Microsoft Initiative)

by rahul 12/8/2008 12:16:28 AM
I was pleasantly surprised to see this web-site today. http://www.winwithsearch.com/ This is an initiative by Microsoft to promote Live search. Check it out and enjoy. Cheers, RahulQuote of the day: The petty economies of the rich are just as amazing as the silly extravagances of the poor. - William Feather


DYK #2 - Sharepoint DSN is stored in registry

by rahul 12/3/2008 10:27:44 AM
Office Server stores its DSN at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\configdb\DSN I went ahead and tried connecting to DDLAB\Microsoft##SSEE but got an error message... TITLE: Connect to Server------------------------------ Cannot connect to DDLAB\Microsoft##SSEE. ------------------------------ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found o... [More]


DYK #1 - PSConfigUI default behavior

by rahul 12/2/2008 3:14:36 AM
In SharePoint, when you run the Post Setup configuration tool, you might have noticed that it works differently for Single server scenario vs. Farm scenario. How does the PSConfigUI decide the steps that needs to be taken? The answer is pretty simple, Registry Keys. The PSConfigUI reads the following keys in order to determine the correct mode in which it should run. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS SETUPTYPE = {CLEAN_INSTALL | REPAIR | V2V_INPLAC... [More]


Search


Tags



Categories

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

All Items
Sign in

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0