how to write a random code in c#
<p>… I'm working on random in C# . I want to use a random to view string move in random &amp; this is the code which i write but it dosen't work
i want to know what wrong i do </p>

<pre><code>using system ;
namespace work
{
    static random random =new random();
    static int max_X=console.windowwidth; 
    static int max_Y=console.windowheight;
    static void main(string[] args)
    {
        int x=random.next(max_X);
        int y=random.next(max_Y);
        console.setcursorposition(x,y);
        console.write("walaa");
    }
}
}
</code></pre>
