你的位置:首页 > 软件开发 > ASP.net > 错误 10 非静态的字段、方法或属性“Test10.Program.a”要求对象引用

错误 10 非静态的字段、方法或属性“Test10.Program.a”要求对象引用

发布时间:2015-10-04 12:00:07
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace Test10 7 { 8 class Program 9 ...
 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5  6 namespace Test10 7 { 8   class Program 9   {10     //int a = 0;      注意存放位置!!!!!11     const int i = 927;12     static void Main(get='_blank'>string[] args)13     {14      int a = 0;15       try16       {17         //i = 112;18         a = i / a;19         Console.WriteLine(a);20       }21       catch (Exception e)22       {23         Console.WriteLine(e.Message);24         Console.ReadLine();25       }26       finally27       {28         System.Console.WriteLine("无论是否发生异常,我都会显示。");29       } 30     }31   }32 }

原标题:错误 10 非静态的字段、方法或属性“Test10.Program.a”要求对象引用

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录