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


Massif Massif aim stupidly high, expect to fail often.
  • C# Extension Properties?

    ExceptionDuck said:
    Jonwib said:

    I did something like this to copy Jquery.data function


    public static class extends{
      public static Dictionary> v = new Dictionary>();
      public static object data(this object o, object key,object val = null)
       if (!v.ContainsKey(o))
       v[o] = new Dictionary();
        return v[o][key];
       v[o][key] = val;
       return val;

    It won't distinguish between equal simple types, but for complex it works well.


    With this you can call any object's data method


    F = new Form();



    and inside F you could call


    this.data("language") and it would return "EN"

    Wow, thread Necromancy!


    Also, use F# you can extend everything Smiley

  • Can visual studio's ctrl+arrow cursor moving logic be made camel-case aware?

    It'd save me a lot of time skipping over method name calls when I want to change something in the middle.

  • Why does C# not support this?

    Minh said:
    Maddus Mattus said:

    What if I had this really common scenario?


    class Chicken { }

    class Hen : Chicken { }

    class Rooster : Chicken { }


    List<Chicken> roster = new List<Chicken>();




    That was going to be my next question Smiley


    And for all that breakage and confusion, what does it get you really?

  • Why does C# not support this?

    Maddus Mattus said:
    Massif said:

    I hate var's


    they are for lazy programmers Smiley


    and worker.DoWork() would not be possible, because DoWork has a return type. Ignoring the return is not 'first class' as Erik would call it Smiley

    Or of course:


    ojbect thing = worker.DoWork();


    And, if you have a class A which inherits from B which inherits from C (and DoWork implementations returning As and Bs) what does:


    C wtf = worker.DoWork();


    Resolve as? It'd just be too confusing for us humble programmers.


    And I'm not letting you take away my god-given right to ignore return values! Big Smile

  • This is getting weird, I need input.

    Sven Groot said:
    Maddus Mattus said:

    Yes, that's part of it. But so's Bernoulli's principle. Some people (I'm not saying you're one of them) seem to believe that because the equal transit time explanation is wrong, Bernoulli's principle itself is wrong or doesn't apply to how wings generate lift. But that's not true. Bernoulli's principle works and is part of how aircraft generate lift. It's just the equal transit time part of the explanation that's wrong. What you're saying is also part of it, but not the only part. It's really quite complicated. Smiley

    So the pressure difference comes from something else? Like turbulence under the wing?


    Gah... I could look something up, but I'm supposed to be pretending to work.

  • Why does C# not support this?

    Well what would


    var whatAmI = worker.DoWork();


    Do? and of course what would:




    Do when we don't care about the return?


    I also don't like it because it doesn't seem properly polymorphic to me, as the return type is clearly related to what the function does, and now the identically named functions are clearly doing something different. But that's just me.

  • This is getting weird, I need input.

    Maddus Mattus said:

    Just watched a documentairy on the BBC about the history of power. Was an interesting bit about the steam engine. People used it for 200 years before they understood the theory.


    Nowadays we take the theory for fact and we forget to check the theory afterwards.


    Same with the plane. For years scientist thought that the wind over a wing created a vacum beneath the wing. This vacum would generate lift. Recently that theory has been ditched. A wing just bends air, the direction on the bending results in an opposite force (lift). That's why at slower speeds they extend flaps to make the wing bend the air even further.


    Theory is all good and well, but practise is what we deal with on a day to day basis.

    Oh good. That whole "makes the air go faster over the top" thing never made much sense to me.


    But have we figured out how sailing works yet?

  • When full disclosure regarding Aliens happens, what will you do?

    Charles said:
    justth3fax said:

    I'll ask them if they use integers in their form of computation or, more interestingly, hand them a calculus text book and see if they recognize the language, mathematics, it contains.



    You read Anathem yet then? If not, thoroughly recommended.

  • Dear MS: Any chance of a free version of InTune for family Admins?

    See now, Intune looks awesome; but it's aimed at business users.


    I would like something similar to avoid the annoyance of having to fix/patch/etc... my parent's/sisters/brothers/mother-in-laws PC every time I see them (or the even greater annoyance of trying to remotely fix and diagnose over the phone).


    Any love for us Family Administrators?

  • Opera 10.5

    stun said:
    Bass said:

    Yeah it is. I didn't expect that from Opera.


    However, as I use it more and more, these are really annoying for me.

    (1) Ctrl + 1-9 for tab switching <=== by default it is mapped to Speed Dial

    (2) Ctrl + PageUp/PageDown for going to next/previous tab <== which I had to configure myself


    (3) Can't access my bookmarks easily like Google Chrome. I have to focus into the Address Bar to show the Bookmarks and click again.

    (4) Bookmarks NOT sortable (is it possible to sort Bookmarks?)



    Do you guys have any other things that you don't like?

    Awesome! I don't even need to open speed dial to use it!

    What was wrong with Ctrl + tab for tab switching btw? It's pretty standard windows behaviour, and ctrl+shift+tab for going back?


    Oh, and opening the bookmarks panel (with the tiny little panel button which is bottom left by default) shows them to be searchable and sortable however you like. Not sure if there's a shortcut to show bookmarks  though.


    Awesome, the pretty obvious-if-not-standard ctrl + B shows / hides the bookmarks panel.