Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

  • Oops, something didn't work.

    Getting "follow" information
    Start following this thread
    Removing your "follow"
    Setting up your "follow"
  • W3bboW3bbo Work hard; increase production; prevent accidents, and be happy.

    sysrpl said:

    Virtual constructors.

    // public virtual SampleObject(string name)  {  }

     

    Virtual static methods.

    // public static virtual DoSomething() { }

     

    Virtual static constructors.

     // public static virtual SampleObject(string name)  {  }

     

    Enumeration set operations.

    // textBox.Anchors += { AnchorStyles.Right, AnchorStyles.Bottom };

     

    Implementation through delegation.

    // public class SomeItems : IList<SomeItem> { private List<SomeItem> items; private implements IList<SomeItem> GetList() { return items; }  }

     

    Static method extensions.

    // public static void DoSomething(this SomeType, string message);

     

    Property extensions.

    // public string FunnyName { this SomeType; get; set; }

     

    Static property extensions.

    // public static string FunnyName { this SomeType; get; set; }

     

    Type aliases.

    // public typedef SomeItemList = List<SomeItem>;

     

    Expando properties and methods.

    // instance.SomeNewProperty = 12; instance.SomeNewMethod = (string message) => MessageBox.Show(message);

     

    Class references.

    // public SomeItemClass = class of SomeItem;

     

    Message based dynamic methods.

    // public message(1) void DoSomething(ref MessageArgs messageArgs) { }

    instance.

    Type aliasing has been in C# since the beginning.

     

    using StringList = System.Collections.List<System.String>;

     

    the only problem with the syntax is that unless a type is specified with a keyword (string/int/etc) you must use the full type name, which gets tedious after a while. I'd prefer it if it respected existing namespace imports to resolve type names.

  • W3bboW3bbo Work hard; increase production; prevent accidents, and be happy.

    sysrpl said:

    Virtual constructors.

    // public virtual SampleObject(string name)  {  }

     

    Virtual static methods.

    // public static virtual DoSomething() { }

     

    Virtual static constructors.

     // public static virtual SampleObject(string name)  {  }

     

    Enumeration set operations.

    // textBox.Anchors += { AnchorStyles.Right, AnchorStyles.Bottom };

     

    Implementation through delegation.

    // public class SomeItems : IList<SomeItem> { private List<SomeItem> items; private implements IList<SomeItem> GetList() { return items; }  }

     

    Static method extensions.

    // public static void DoSomething(this SomeType, string message);

     

    Property extensions.

    // public string FunnyName { this SomeType; get; set; }

     

    Static property extensions.

    // public static string FunnyName { this SomeType; get; set; }

     

    Type aliases.

    // public typedef SomeItemList = List<SomeItem>;

     

    Expando properties and methods.

    // instance.SomeNewProperty = 12; instance.SomeNewMethod = (string message) => MessageBox.Show(message);

     

    Class references.

    // public SomeItemClass = class of SomeItem;

     

    Message based dynamic methods.

    // public message(1) void DoSomething(ref MessageArgs messageArgs) { }

    instance.

    Type aliasing has been in C# since the beginning.

     

    using StringList = System.Collections.List<System.String>;

     

    the only problem with the syntax is that unless a type is specified with a keyword (string/int/etc) you must use the full type name, which gets tedious after a while. I'd prefer it if it respected existing namespace imports to resolve type names.

  • ktrktr two sides to everything

    sysrpl said:

    Virtual constructors.

    // public virtual SampleObject(string name)  {  }

     

    Virtual static methods.

    // public static virtual DoSomething() { }

     

    Virtual static constructors.

     // public static virtual SampleObject(string name)  {  }

     

    Enumeration set operations.

    // textBox.Anchors += { AnchorStyles.Right, AnchorStyles.Bottom };

     

    Implementation through delegation.

    // public class SomeItems : IList<SomeItem> { private List<SomeItem> items; private implements IList<SomeItem> GetList() { return items; }  }

     

    Static method extensions.

    // public static void DoSomething(this SomeType, string message);

     

    Property extensions.

    // public string FunnyName { this SomeType; get; set; }

     

    Static property extensions.

    // public static string FunnyName { this SomeType; get; set; }

     

    Type aliases.

    // public typedef SomeItemList = List<SomeItem>;

     

    Expando properties and methods.

    // instance.SomeNewProperty = 12; instance.SomeNewMethod = (string message) => MessageBox.Show(message);

     

    Class references.

    // public SomeItemClass = class of SomeItem;

     

    Message based dynamic methods.

    // public message(1) void DoSomething(ref MessageArgs messageArgs) { }

    instance.

    @sysrpl

    "Expando properties and methods.

    // instance.SomeNewProperty = 12; instance.SomeNewMethod = (string message) => MessageBox.Show(message);"

     

    I don't know... Perhaps only in a dynamic context?

     

    dynamic instance = GetInstance();
    instance.SomeNewProperty = 12;
    instance.SomeNewMethod = (string message) => MessageBox.Show(message);

  • Adam SpeightAdam​Speight2008 The Bandito Coder

    The ability to blend the different .net languages in a the same sourcecode, through the use of a new # tag.

    Just like vb.net has XML Literals.

     

    #Language="vb.net"
    Public Module Module1
    
     Sub Main()
    Dim n1 As Double=2
    Dim n2 As Double=3
    Dim result = Addition(n1,n2)
     Console.WriteLine(result)
     Console.ReadKey()
     End Sub
    #EndLanguage
     
    #Language="c#"
     public  double Addition(double x, double y) {
     return x + y;
    }
    #EndLanguage
    

    The c# is probably wrong (not my best) but you get the gist.

    Developers coding in prefered language.

     

    I don't think it be that hard to implement, all the required mechnisms are already built; the compilers. It may need a new linker.

     

  • Scottspivonious

    AdamSpeight2008 said:

    The ability to blend the different .net languages in a the same sourcecode, through the use of a new # tag.

    Just like vb.net has XML Literals.

     

    #Language="vb.net"
    Public Module Module1
    
     Sub Main()
    Dim n1 As Double=2
    Dim n2 As Double=3
    Dim result = Addition(n1,n2)
     Console.WriteLine(result)
     Console.ReadKey()
     End Sub
    #EndLanguage
     
    #Language="c#"
     public  double Addition(double x, double y) {
     return x + y;
    }
    #EndLanguage
    

    The c# is probably wrong (not my best) but you get the gist.

    Developers coding in prefered language.

     

    I don't think it be that hard to implement, all the required mechnisms are already built; the compilers. It may need a new linker.

     

    Blending languages would be nice, although I'd be happy with files being in one language but projects being in multiple. So if I find a neat class on the web that's in C# but I want to use it in my VB project, and I don't want two DLLs, I don't need to translate the C# to VB (and inevitably introduce errors).

  • W3bboW3bbo Work hard; increase production; prevent accidents, and be happy.

    spivonious said:
    AdamSpeight2008 said:
    *snip*

    Blending languages would be nice, although I'd be happy with files being in one language but projects being in multiple. So if I find a neat class on the web that's in C# but I want to use it in my VB project, and I don't want two DLLs, I don't need to translate the C# to VB (and inevitably introduce errors).

    Just integrate ILMerge into your build process.

     

    But is translating from VB to C# and back really that hard? Given most samples I see online (like on CodeProject) are in C# I think it'd be better to use C# anyway. The only VB samples I see are for trivial things because the people who consume them are beginners who are still finding their feet.

  • Adam SpeightAdam​Speight2008 The Bandito Coder

    W3bbo said:
    spivonious said:
    *snip*

    Just integrate ILMerge into your build process.

     

    But is translating from VB to C# and back really that hard? Given most samples I see online (like on CodeProject) are in C# I think it'd be better to use C# anyway. The only VB samples I see are for trivial things because the people who consume them are beginners who are still finding their feet.

    It would allow the coder to be more productive, since you eliminate the translation process.

  • W3bboW3bbo Work hard; increase production; prevent accidents, and be happy.

    AdamSpeight2008 said:
    W3bbo said:
    *snip*

    It would allow the coder to be more productive, since you eliminate the translation process.

    I disagree there. When I translate code I'm forced to read it and see how it works, which is a good thing: it means I understand what my code is doing rather than doing "copy and paste programming".

  • Thread Closed

    This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
    or Contact Us and let us know.