fork download
  1. using static System.Console;
  2.  
  3. namespace vetor {
  4. public class Program {
  5. public static void Main() {
  6. int[] vet = new int[3];
  7. for (int i = 0; i < vet.Length; i++) {
  8. WriteLine("Digite o numero: ");
  9. vet[i] = int.Parse(ReadLine());
  10. }
  11. for (int a = 0; a < vet.Length; a++) WriteLine($"{vet[a]}");
  12. }
  13. }
  14. }
  15.  
  16. //https://pt.stackoverflow.com/q/175261/101
Runtime error #stdin #stdout #stderr 0.03s 16164KB
stdin
Standard input is empty
stdout
Digite o numero: 
stderr
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: s
  at System.Int32.Parse (System.String s) [0x00003] in <6649516e5b3542319fb262b421af0adb>:0 
  at vetor.Program.Main () [0x0001f] in <26a46cf313ae4bf89f63f55677339ed3>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null.
Parameter name: s
  at System.Int32.Parse (System.String s) [0x00003] in <6649516e5b3542319fb262b421af0adb>:0 
  at vetor.Program.Main () [0x0001f] in <26a46cf313ae4bf89f63f55677339ed3>:0