模仿System.Text.Encoding的实现,意义何在?

 1 using System;
 2 
 3 namespace zhh9113
 4 {
 5     public abstract class Class2
 6     {
 7         protected int i;
 8         public static Class3 CLASS3
 9         {
10             get{return new Class3();}
11         }
12         public abstract int getI();
13         
14     }
15     public class Class3 : Class2
16     {
17         public Class3()
18         {
19             base.i = 315;
20         }
21 
22         public override int getI()
23         {
24             return base.i;
25         }
26     }
27     class Demo
28     {
29         
30         [STAThread]
31         static void Main(string[] args)
32         {
33             int z;
34             Class2 zhh = Class2.CLASS3;
35             z = zhh.getI();
36             Console.WriteLine(z);
37             Console.ReadLine();
38         }
39     }
40 }

        不知微软这样实现System.Text.Encoding有什么意义或用意?
posted @ 2005-08-22 12:53  zhh007's Bolg  阅读(486)  评论(0编辑  收藏  举报