fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. char text = "";
  8. char possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  9.  
  10. for(int i=0; i < 5; i++)
  11. text += possible.charAt(Math.floor(Math.random() * possible.length));
  12.  
  13. return text;
  14. }
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(7,17): error CS0029: Cannot implicitly convert type `string' to `char'
prog.cs(8,21): error CS0029: Cannot implicitly convert type `string' to `char'
prog.cs(11,26): error CS1061: Type `char' does not contain a definition for `charAt' and no extension method `charAt' of type `char' could be found. Are you missing an assembly reference?
/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(13,5): error CS0127: `Test.Main()': A return keyword must not be followed by any expression when method returns void
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty