C# V2 Language Specification

Thursday, October 30, 2003 2:49:28 PM (Central Standard Time, UTC-06:00)

Can be found at http://msdn.microsoft.com/vcsharp/team/language/default.aspx .

Great IE Web Development Tools

Monday, October 27, 2003 8:11:03 PM (Central Standard Time, UTC-06:00)

My brother was over this weekend and we were looking at the web design of one of the sites he had in staging (here is the production site ). He was working on a face lift and he noticed that my blog had a "window" floating on the right hand side, containing a calendar, navigation, etc. He was wondering what the html looked like. I highlighted the area and clicked 'View Partial Source'. He went nuts... commenting stuff like you're the smartest brother I have (I am also the only by the way) or something along those lines of that was really cool how did you do that and can I have the tool.

Here are a couple of tools integrated into IE that have been great for doing site development and debugging.

Microsoft Web Developer Accessories
Even though this was developed for IE5, most of the functions still work with IE6. Here is the description from Microsoft:

These two tools help the Web developer or those who are just curious about how pages are coded. The DOM tree tool lets you view all the Document Object Model properties in tree form via a right click of the mouse or from the Tools menu. And for those who are tired of scrolling through hundreds of lines of HTML to find that one section of code that does what you want, search no more! Simply highlight the area of Web page that you want to see the source for, right-click on it and select View Partial Source. It's that simple! Not supported by Microsoft.

Toggle Borders
This utility allows you to toggle table borders from 1px red border to the original style. It is great for determining how a web page is laid out. You can download it from the zip at the bottom of this post (also included are the MS Web Developer Accessories). As far as credits, I am not sure where this came from.

Has anyone else seen any great tools for web development integrated into IE?

Download: WebDevTools.zip

Preparing for the MSDN Web cast

Friday, October 24, 2003 8:32:30 PM (Central Standard Time, UTC-06:00)

Friday night and I am clicking away at the keyboard preparing for next Wednesday's (October 29, 2003 11:00am - 12:30pm PST)  MSDN Webcast.  You can find the link to it here .  You have to like the title... is that a mouthful or what?

Here is the description:

Applying Microsoft Application Blocks to Increase Developer Productivity and Reduce Application Time-to-Market

The Microsoft Platform Architecture Group (PAG) has produced reusable code components written around common technical challenges. These Application Blocks help reduce the cost of building a solution and help developers to be more productive on Microsoft® .NET. They make it easier to move away from the "build your own" mentality by supplying proven, scalable, tested components built using best practices published by Microsoft. And, of course, the source code is provided.

The webcast will get IT managers and development leads up-to-speed on the Application Blocks and how to take advantage of them to create higher quality software solutions in less time.

nAnt Pad

Friday, October 24, 2003 2:34:27 PM (Central Standard Time, UTC-06:00)
A tool for editing Nant scripts: http://www.nantpad.com

C# Language Primer

Tuesday, October 21, 2003 5:40:20 AM (Central Standard Time, UTC-06:00)

The main theme behind the C# Language Primer presentation was to get consultants up to speed on OO techniques as related to the C# language.  The following topics are covered in the presentation:

Inheritance
Derivation / Controlling Derivation
Member Overloading
Bases and Method dispatching
Using virtual/abstract/ new/sealed modifiers

C# Language Primer.zip (816.58 KB)

Advanced Windows Forms Deployment

Monday, October 20, 2003 3:14:35 PM (Central Standard Time, UTC-06:00)

This is the presentation that I did for Microsoft DevCare, January 2003.  It has a bunch of code examples... including Smart Client deployment, Shadow Copying dll's and setting up security for Smart Client deployments.

Other presentations to follow.

AWF - Deployment_Jan2003.zip (1.39 MB)

Defining Interfaces

Tuesday, October 14, 2003 9:15:24 PM (Central Standard Time, UTC-06:00)
This is from a C# primer presentation for fellow consultants at the company I work for. I have been concentrating on the finer points of interfaces and how they work, what there purpose is and some example implementations.

When I had implemented interfaces before I always assumed that if you declared an interface like:
interface IFix { void Heal(); }

The following two implementations of void Heal() would meet the interface contract in the same way:





    class Person : IFix 
{
public void Heal()
{
Console.WriteLine("Person::Save");
}
}
equal to:
    class Person: IFix 
{
//explicit
void IFix.Heal()
{
Console.WriteLine("Patient::Save");
}
}

Well it's not a stylistic difference like I first thought. Take a look at these examples for yourself:

ISemantics.cs

using System;

namespace InterfaceSemantics
{
    interface IFix { void Heal(); }

    class Person : IFix
    {
        public void Heal()
        {
            Console.WriteLine("Person::Save");
        }
    }

    class Doctor : Person
    {
        public new virtual void Heal()
        {
            Console.WriteLine("Doctor::Save");
        }
    }

    class Surgeon : Person, IFix
    {
        //explicit

        public new virtual void Heal()
        {
            Console.WriteLine("Surgeon::Save");
        }

    }

    class Patient : IFix
    {
        //explicit
        void IFix.Heal()
        {
            Console.WriteLine("Patient::Save");
        }            
    }
}

form1.cs (partial - Form1_Load)

private void Form1_Load(object sender, System.EventArgs e)
        {

            Doctor doc = new Doctor();
            doc.Heal();

            Person basecls = (Person)doc;
            basecls.Heal();

            //This impl you can access the interface through the class.
            Surgeon cutter = new Surgeon();
            cutter.Heal();

            //still works
            IFix isurg = (IFix)cutter;
            isurg.Heal();

            //Using explicit declaration of the interface
            Patient pat = new Patient();
            IFix iface = (IFix)pat;
            iface.Heal();

           //This impl needs a request for the interface
            //Here we get a compilation error:
            //        'InterfaceSemantics.Patient' does not contain a definition for 'Heal'
            //
            //for code:
            
            Patient pat = new Patient();
            pat.Heal();
       
            //because we used void IFix.Heal() as the prototype to fulfill the interface contract
           

        }


Source Code Viewer

Tuesday, October 14, 2003 7:21:01 AM (Central Standard Time, UTC-06:00)
Creating a Source Code Viewer, check out the source code viewer in MSDN.

Visual Studio .NET 2003 Posters

Monday, October 13, 2003 3:45:18 PM (Central Standard Time, UTC-06:00)
You can find the posters here.

Microsoft Log Parser 2.1

Sunday, October 12, 2003 4:42:33 PM (Central Standard Time, UTC-06:00)
Log Parser 2.1 is available for parsing a variety of logs. Including IIS logs. It comes with a COM API.

Exposing Additonal Type Information in the Debugger

Sunday, October 12, 2003 3:11:24 PM (Central Standard Time, UTC-06:00)

Use mcee_cs.dat (found at C:\Program Files\Microsoft Visual Studio .NET\Common7\Packages\Debugger\) to expose addtional type information in the debugger. If you have used C++ in the past, this is the equivalant to the autoexp.dat. There is very little documentation in MSDN. However it is pretty easy to add type information to the mcee_cs.dat file. By doing this, additional information will be added to the watch / locals and debugger ToolTips during debugging. The mcee_cs.dat. changes are only read at startup, so if you make changes while the IDE is open, you will need to shut it down and restart it.

Unfortunately the mcee_cs.dat is very limited. You may only call properties of the type ( no methods ). I also found that VSTweak has the ability to edit the mcee_cs.dat file (although the implemenation is still a bit rough).  I would suggest editing by hand. You can find the VS Power Toys (which includes VSTweak) for the IDE on GotDotNet.

Logging Block Beta Released

Saturday, October 11, 2003 7:10:22 PM (Central Standard Time, UTC-06:00)

Logging Block Beta just released:
You will need Enterprise Instrumentation Framework from your MSDN Universal account to play with the Block.