Witchking's Profile User Rating: -----

Reputation: 68 Whiz
Active Members
Active Posts:
189 (0.17 per day)
17-February 13
Profile Views:
Last Active:
User is offline Jun 18 2015 02:27 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Icon   Witchking has not set their status

Posts I've Made

  1. In Topic: How can a method work with just a declaration?

    Posted 28 Feb 2015

    Visual studio has access only to the compiled library containing the method you're trying to look at, not its source code. As such, Visual studio can see the signature of the method, but not the body. Tools such as the one andrewsw linked can generate source code from the compiled code.

    Here you can actually see commented .NET source code. However like andrewsw suggested it will likely not be of any benefit to your learning, because the code is often very complicated, and presumably beyond what you should be learning. Instead you should work your way up, perhaps by reading a book that follows a good thought out structure, not try to take shortcuts.
  2. In Topic: Random

    Posted 2 Jul 2014

    You could use a Dictionary<int, char> and map integers 0 through 9 to the corresponding characters, and 10 through 35 to the letters of the alphabet. Then generate random numbers in the range 0-35 and use the dictionary to get a character to represent that value.

    Or you could first generate the number and then convert it to a base 36 representation where you assign all the letters of the alphabet to the integers 10 through 35.
  3. In Topic: Need to replace null value by 0 to calculate

    Posted 28 Jun 2014

    Use the null-coalescing operator.

    x = y ?? 0;
    //these two do the same thing
    if (y == null)
    	x = 0;
    	x = y;
  4. In Topic: Randomly select strings from array

    Posted 30 Mar 2014

    Shuffle the collection and pick the first three.

    To do that I would extend the generic IEnumerable with a shuffle method using Fisher Yates, and a TakeRandom method that combines the new shuffle and the existing take method.

    This way you'll also be left with two cool little methods that you can reuse in the future.
  5. In Topic: creating a game in a website

    Posted 22 Mar 2014

    I don't want to sound rude, but i feel like you should be able to solve this by yourself long before you start designing systems that handle people's money.

My Information

Member Title:
D.I.C Head
21 years old
March 1, 1994
Programming Languages:

Contact Information



Witchking has no profile comments yet. Why not say hello?