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

Discussions

  • Replacing Object Target in For Loops (C#)

    bool allChecked;
    
    if (l1tag == 1) allChecked = ...;
    else if (l2tag == 2) allChecked = ...;
    // continued...
    
    if (allChecked)
    {
        rannum = randNum.Next(101);
        textBox1 = rannum.ToString();
        i++;
    }
    else
    {
        textBox1.Text = "Not Eligible for Roll";
        i++;
    }

    ?

    Edit: Frank has a way better solution, it depends how seriously you want to take the architecture.

  • SharePoint Development? Is it possible?

    Windows Server 2008 includes SharePoint and you can get that of DreamSpark.

  • Micorosft.​com Preview Site and Metro Design Language

    As a web designer I feel I can safely say that site is legitimately bad. It's impossible to decide what to focus on.

     

    Oh I just clicked on "For Home" and that is much nicer, although far from perfect. The blue makes a far better accent colour than the orange. I like the current one more. It's simpler.

  • ASP.NET and ​Serializati​on

    I've seen the casting issue before. It seems to be something about the way the .Net runtime handles types from assemblies other than the calling assembly. As far as I am aware the XmlSerializer doesn't appear to be affected by this shortcoming, but the SOAP and Binary formatters are. Also keep in mind that Binary and SOAP serialisation require some reflection permissions not normally granted under medium trust and may cause you problems on the server (the XmlSerializer only serialises public fields, but may still have some permissions issues).

    If you're going to use XML in the value of an HTTP form field, you're going to want to encode it using HttpUtility.

    Generally speaking, I'd question your method and advise you to investigate some ASP.Net MVC tutorials, but without knowing more details I'll bite my tongue.

  • C# equivalent to Python ​dict.​fromkeys(​ListofKeys,​defaultvalu​e) ?

    Is this what you're aiming for?

    var myKeys = new List<MyKey>();
    var myDict = myKeys.Distinct().ToDictionary(x => x, x => 0);

    If you made any changes to the myKeys list they wouldn't be carried over to the dictionary, however any changes to the MyKey objects would be preserved.

  • Design Patterns for Games

    I did a university module on programming games in C++ and this was the textbook. I'd say it's aiming a fair bit lower than Game Engine Architecture in terms of programming ability (it was only a second year subject). Amazon offers them both in a bundle deal.

  • Java value types Vs .NET

    @magicalclick: Basically your first point was entirely correct. Java completely lacks the ability to pass a reference to a value or references, it can only pass references to objects.

    Nowhere in Java can you pass a parameter, assign it and have that assignment be anything but local to the method.

    You can't in C# either (without the ref or out keywords) because even though it supports operator overloading, to prevent exactly this problem, it does not allow you to override the assignment operator.

    C++ is a different kettle of fish because it makes it much more explicit what is a reference or pointer and what is not.

  • Java value types Vs .NET

    The C# code:

        public static void modify(ref int i)
        {
            i = 10;
        }

    does not do the same thing as the Java code:

        public static void modify(Integer i)
        {
            i = 10;
        }

    The Java code will only change the value of i inside the method. Which in the case I've contrived does absolutely nothing.

  • internet cost / speed.  Post yours.

    $60 a month for 1000kbps, 50GB limit including uploads and downloads. Welcome to Australia. I think I might kill myself.

  • Video Downloads Truncating

    I'm also from Melbourne and seeing the same problem. I'd been blaming my ISP but apparently that's not the case. It's extremely frustrating.

     

    Update: Downloading older videos still seems to work without a problem.