using System; //method_out_c.cs namespace key_out_method { public class player { public static void info(out int n, out int score, out string name) { n = 10; score = 2; name = "baba"; //Console.WriteLine(n * score + name); } } class test { public static void Main() { int i, j ; string s ; // variable need not to be initialized //Static member cannot be accessed with an instance outerence; //qualify it with a type name instead player.info(out i, out j, out s); Console.WriteLine(i * j + s); } } } |