c#初学
2012-09-01 09:19
99 查看
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { try { stu stu1 = new stu(); Console.WriteLine("hello word"); int s1, s2, z = 0; s1 = int.Parse(Console.ReadLine()); s2 = int.Parse(Console.ReadLine()); z = stu1.add(s1, s2); Console.WriteLine(z); } catch (IndexOutOfRangeException e) { Console.WriteLine("hello word"); } } public class stu { public int add(int x, int y) { return x + y; } } } }
相关文章推荐
- 由C#风潮想起的-给初学编程者的忠告
- C# 初学
- 初学C#之工具篇
- 由C#风潮想起的-给初学编程者的忠告
- (二)初学C# 3.0之扩展方法
- 由C#风潮想起的-给初学编程者的忠告
- c#开发Android初学(一)
- 初学C#--1
- 初学C#--2
- 初学C#编程的注意事项
- 初学C#的小白写的冒泡排序,往排好序的数组内插入一个数再排好序输出
- c#初学之petshop!
- [刘巍]由C#风潮想起的-给初学编程者的忠告
- 由C#风潮想起的-给初学编程者的忠告
- 初学 C#
- 由C#风潮想起的-给初学编程者的忠告
- C#初学界面参考小程序
- 初学c# -- 学习笔记 小结
- C# 一些小细节 初学版
- 非API程序模仿QQ截图。初学探讨。C#