Tag: .Net

  • Silverlight Application Code 2103

    When working with Silverlight, if you get an application code error 2103 and go looking for answers, you’ll find posts like this that suggest it’s a namespace problem. If that’s not the problem, you’ll find yourself stuck without many other suggestions. Here’s a simple check for another common problem, permissions to download the Silverlight xap. […]

  • Expert Business Objects: Read It, Even If You Don’t Need The Framework

    I’ve been reading Rocky Lhotka’s Expert C# 2008 Business Objects book. CSLA is a bit of a polarizing framework. A lot of comments on the book are along the lines of “outlived it’s usefulness given the current framework updates” or just generally “not keeping up with modern software trends.” It should also be noted that […]

  • Understanding Types in .Net Part 1: var keyword

    It’s surprising to me how many developers don’t understand the .Net type system. So I decided to write a series of posts on of some of the misconceptions. The “var” keyword, introduced in C# 3 is implicit typing. For all intents and purposes, this is the same as strong typing. It is strongly typed at […]

  • Equals, ==, and MSTest

    public class SampleClass { public int X { get; set; } public override bool Equals(object obj) { if (obj == null) return false; if (obj.GetType() != typeof(SampleClass)) return false; var s = obj as SampleClass; return this.X == s.X; } } Tests: [TestMethod()] public void EqualsTest() { var sc = new SampleClass { X = […]

  • External Tools in Visual Studio

    If you use subversion or git, bouncing over to source control is something you have to do a lot from Visual Studio. Here’s how to make it easier. In Visual Studio, go to Tools -> External Tools and setup Explorer if you use TortoiseSVN, or GitBash if you use that.