Questions tagged [dotnetfiddle]
4 questions
1
vote
1 answer
using .Net fiddle on a chromebook, tried to make a guessing game. the hints (higher or lower) arent working and the target number seems to change
I am trying to run the code below on .Net fiddle, and am encountering the following problem. The randomly generated target number seems to change and the hints (higher or lower) seem to change with your guesses. Why is this happening?
I'm also sure…

osyt
- 23
- 2
1
vote
1 answer
Problem with DotNetFiddle and Console.ReadLine that causes a Re-run when pressing ENTER key
I have a weird scenario using a C# online compiler with this code:
int randomNumber;
int guess;
int countGuess;
bool correctGuess = false;
bool alreadyCalled = false;
int lastGuess;
public void Main()
{
if(!alreadyCalled)
{
…

Ginxxx
- 1,602
- 2
- 25
- 54
0
votes
1 answer
Why does my random number generated keep changing in .NET Fiddle / dotnetfiddle?
Here's my code:
using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
Random r = new Random();
int Winner = r.Next(1, 10);
bool win = false;
…

Luke
- 19
- 1
0
votes
0 answers
Moq 'Security accessibility of the overriding method must match the security accessibility of the method being overriden' in dotnetfiddle
I am trying to write a simple unittest in dotnetfiddle using Moq, but for some reason the runtime complains about security accessibility:
Run-time exception (line 20): The type initializer for
'Moq.ProxyFactory' threw an exception.
Stack…

devqon
- 13,818
- 2
- 30
- 45