Q:

Simple random number guessing game with various difficulties

I have been studying C#, and I am trying to model the Random number guessing game. 
1 User inputs the number of try. 
2 Computer generates random number. 
3 If numbers doesn't match user lose one try
and if they match user gets two bonus try.    
Is my program reasonable or is there anything I need to improve? 
As player goes to next round, I also want 
to increase random number range by 100 to increase
difficulty. For example, first round 1-100 
next round 1-200 and so on.  
How can I do that?  Any help would be appreciated. 
 public class GuessGame
 {

    public class Game
    {
        public int attemp { set; get; } = 0; 
        public override string ToString()
        {
           return $"The player's attemp <{attemp}>";
        }
    }
    public static void Test()
    {
        Console. WriteLine("Lets play the Low or High Game");
        var game = new Game();

        game.attemp = InputAttempt();
        PlayGame(game);
    }
    public static void PlayGame(Game game)
    {
        Console. WriteLine(game);
        var comNum = GenerateComNum();
            Console. WriteLine($"This is for test: ComNum is {comNum}");
            do
            {
                var userNum = GenerateUserNum();
                CompareNum(userNum, comNum, game);
                Console. WriteLine(game);

            } while (game.attemp >0 );
     }

    static void CompareNum(int userNum, int comNum,Game game)
    {

        if (userNum < comNum)
        {
            Console. WriteLine("User num is too Low try again");
            Console. WriteLine();
            game.attemp--;
        }
        else if(userNum > comNum)
        {
            Console. WriteLine("User num is too High try again");
            Console. WriteLine();
            game.attemp--;
        }
        else if(userNum == comNum)
        {
            Console. WriteLine("You got the answer!!"); 
            Console. WriteLine();
            game.attemp += 2;
            PlayGame(game);
        }

    }
    static int GenerateUserNum()
    {
        int userNum;
        Console. Write("Please enter the num btw 1-100\t\t");
        while (! Int32.TryParse(Console. ReadLine(), out userNum))
        {
            Console. WriteLine("Invalid num please input whole num");
        }
        return userNum;
    }
    static int GenerateComNum()
    {  
        Random rnd = new Random();
        var comNum = rnd. Next(1,101);
        return comNum;
    }
    static int InputAttempt()
    {
        var attempt = 0;
        Console. Write("How many Attemps would you like?\t");

        while (! Int32.TryParse(Console. ReadLine(), out attempt))
            {
                Console. WriteLine("Invalid num please input whole num");
            }
        return attempt;
    }
}

A:

1) Avoid using var if you want your code to be more readable. 
2) Both CompareNum() and PlayGame() methods should be defined within the Game class as they rely on a game (which means they don't need to have a game as argument anymore)
3) In the CompareNum() method 
Console. WriteLine("User num is too Low try again");
Console. WriteLine();

can become
Console. WriteLine("User num is too Low try again\n");

4) In the GenerateComNum() method you can shorten
var comNum = rnd. Next(1, 101);
return comNum;

to
return rnd. Next(1, 101);

and you should avoid creating a new Random() every time you have to generate a random number because it could create unexpected results.  You should make a static Random rnd = new Random(); and only use rnd. Next(x, y) whenever you need a random number. 
5) In the PlayGame() method you shouldn't have a do ... while loop because if the user chooses to have 0 attempts then he should lose instantly and that's not what will happen with a do ... while loop 
6) The usual order for accessors is get then set, you did the opposite : public int attemp { set; get; } = 0; it'll work in both orders, it's just to make things more readable. 
7) It's realy unlikely to happen but if the user would win during realy long time, your application could have a System. StackOverflowException because you are calling PlayGame() while it is already running when the user wins which will cause the current one running to wait for the new one to finish and those will stack up and take more and more memory, this is recursion, sorry and check internet if my explanations aren't clear. 
To increase the range of possible numbers being generated, you can use a variable to determine what the max generated number is and put this variable as second argument instead of 101 when you do rnd. Next(1, 101);

