© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
2 replies
Moji

Tested it a lot of times but still giving unexpected error

using System;

class Program
{
public static void Main (string[] args)
{
Random numGen = new Random();
public int generatedNum = numGen.Next(0, 64);

Console.WriteLine(generatedNum);

}

}
Screenshot_20220909-212807_Chrome.jpg
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ I TRIED SO MANY TIMES BUT STILL ERROR ;(((((((((
C#CC# / help
14mo ago
❔ dotnet build quiet still showing a lot of warnings
C#CC# / help
4y ago
Stopwatch not giving accurate times
C#CC# / help
3y ago
✅ `unexpected symbol switch` error
C#CC# / help
3y ago