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

Reputation: 68 Whiz
Group:
Active Members
Active Posts:
188 (0.35 per day)
Joined:
17-February 13
Profile Views:
1,619
Last Active:
User is offline Yesterday, 10:06 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: 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.
  2. 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;
    
  3. 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.
  4. 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.
  5. In Topic: Unreal Engine 4 released - anyone looked at it?

    Posted 20 Mar 2014

    Do note that it's 19$ a month. Although you can of course just subscribe for a month to download it and then unsubscribe.

    The engine seems really interesting and powerful though and i'd love to give it a try.

My Information

Member Title:
D.I.C Head
Age:
20 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?