Export class type

Source: Internet
Author: User
Tags export class

C # The API has the following functions:

View code

 1   Using  System;  2   Using  System. Collections. Generic;  3   Using  System. LINQ;  4   Using  System. text;  5   6   Namespace Leleapplication5  7   {  8       Abstract   Class  Person  9   {  10           Private   String  _ Name;  11           Public   String  Name 12   {  13               Get { Return  _ Name ;}  14   }  15           16   }  17       Class  Empoyee: person  18   {  19         20   21   }  22       Class  Janitor: person  23   {  24         25   }  26       Class  Program  27   {  28           Static  Void Main ( String  [] ARGs)  29   {  30               VaR People = New List <person> ();  31 People. Add ( New  Empoyee ());  32 People. Add ( New  Janitor ()); 33               Foreach ( VaR Item In  People)  34   {  35 Console. writeline ( "  Type {0}  "  , Item. GetType (). Name );  36   }  37  Console. readkey ();  38   }  39   }  40 }

 

But we advocate this: the text is used to update the user from the Code itself, rather than from the build in framework. For freedom

View code

For example, Localization:

View code

 1   Class  Janitor: person  2   { 3   ...  4           Public   Override   String  Typeofdata  5   {  6               Get { Return Internationlization. Translate ( String  Janitor );}  7   } 8   ...  9 }

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.