第4章-面向对象基础.pptVIP

  • 5
  • 0
  • 约6.27万字
  • 约 101页
  • 2019-08-16 发布于福建
  • 举报
TreeView树视图控件 TreeView控件以树形结构的方式来显示数据。其目录的每个节点都有一个与之相关的TreeNode对象,每个TreeNode对象都包含一个Nodes和Level属性。通过TreeView控件可实现下图所示效果。 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace program06 { class Program06 { static void Main(string[] args) { TestFunc(1, 2, 3, 4); Console.ReadKey(); } public static void TestFunc(params int[] array) { for (int i = 0; i array.Length; i++) { Console.WriteLine(array[i]); // 循环打印出数组中的数据 } } } } * class test { int a, b; public void accept(int a1, int b1) { a = a1; b = b1; } public int swap(ref int a1, ref int b1,out int result) { int t; t = a1; a1 = b1; b1 = t; result = a1 * b1; return a1 + b1; } } class Organization { public static void Main() { test t1 = new test(); int a = 3; int b = 4; int sum,d; sum=t1.swap(ref a, ref b,out d); Console.WriteLine({0},{1},{2},{3},a,b,sum,d); Console.ReadKey(); } } * * class test { int a, b; public void accept(int a1, int b1) { a = a1; b = b1; } public bool compare(int a1,int b1) { bool f = a1 b1; Console.WriteLine(整?数簓比括?较?大洙?小?); return f; } public bool compare(char a1, char b1) { bool f = a1 b1; Console.WriteLine(字?符?比括?较?大洙?小?); return f; } } class Organization { public static void Main() { test t1 = new test(); bool f,f1; f = pare(3, 4); f1 = pare(5, 3);

文档评论(0)

1亿VIP精品文档

相关文档