.Net blog of Sijin Joseph

My experiences with .Net

  • These controls rock

    Divil has updated his excellent UI controls for .Net. These controls totally blew me away, much more easy to use and way better looking than some commercial controls, and the prices are simply amazing. It's free for non-profit use. The controls include Menu and toolbars which can be docked to any side and have custom renderers, Docking window controls, outlook bar etc. This guy is really a guru of windows forms control development.

  • Interfaces can be both value and reference type

    Yesterday someone posted a message on our user group asking if interfaces were reference or value type. Initially i thought reference type, but then i thought that since value types can implement interfaces too, it needs to be a value type as well.
     
    I wrote a small code snippet and used propertyGrid control to get visual results :)
     
    public interface ITest
     
    {
     
    }
     
    public class TestClass : ITest
     
    {
     
    }
     
    public struct TestStruct : ITest
     
    {
     
    }
     
     
     
    Here TestClass is a Ref type and TestStruct is a Value type.
     
    i wrote this code in the Form_load event
     
    private void Form1_Load(object sender, System.EventArgs e)
     
    {
     
    TestClass tc = new TestClass();
     
    ITest itc = (ITest)tc;
     
    propertyGrid1.SelectedObject = itc.GetType();
     
     
     
    TestStruct ts = new TestStruct();
     
    ITest its = (ITest)ts;
     
    propertyGrid2.SelectedObject = its.GetType();
     

    }
     
     
     
    When i ran the propertyGrid showed that
    itc.ValueType is 'false' and its.ValueType is 'true'.
     
    So interface has the same semantics as the type that implements the interface.
     
     

  • My session for Delhi .Net User Group

    July session of Delhi .Net UG
     
    I did  session on advanced data binding in the Windows Forms. Basically i talked about how to setup two-way databinding in Windows Forms, implementing custom collection classes which implement IBindingList. Also i talked about implementations of  IDataErrorInfo, IEditableObject etc. The session was well liked by everyone (I think :) ). Here is the source code for the demo.
     
    One thing i realized while making the presentation for this demo was that Data Binding is basically an implementation of the MVC architecture for .Net basically the framework is provding the interface for the controller part of the MVC architecture, the model is our object and the views are the forms.
     
    It was my first talk at a UG meeting and i really enjoyed it. I met the manager of our group Saurabh Verma(an MVP) again, it was Saurabh who had invited me to give the talk. Also i met a lot of core group members of our user group. It was nice to meet so many fellow developers. Being an independednt softwae developer i don't get to meet many of them. :) Looking forward to giving a presentation this month also.

  • Pop Quiz

     public class MyBase
     {
      private string _foo = "Hello World";

  • CVS .Net

    It's been 2 weeks since i switched my SCC provider to CVSNT http://www.cvsnt.org . It has solved a lot of problems that i had before when i wanted to work on a new release but still maintain the old codeline for bug fixes and patches. Now using the branching capabilities of CVS i have two codelines life is much easier.