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

Reputation: 68 Whiz
Group:
Active Members
Active Posts:
189 (0.25 per day)
Joined:
17-February 13
Profile Views:
2,054
Last Active:
User is offline Mar 03 2015 02:10 PM
Currently:
Offline

Previous Fields

Country:
FI
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0
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;
    else
    	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
Age:
21 years old
Birthday:
March 1, 1994
Gender:
Location:
Finland
Programming Languages:
C#

Contact Information

E-mail:
Private

Comments

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