C#ÈëÃÅ
±äÁ¿¡¢³£Á¿¼°±í´ïʽ±äÁ¿ºÍ³£Á¿±äÁ¿(¾²Ì¬¡¢·Ç¾²Ì¬¡¢Êý×éÔªËØ¡¢Öµ²ÎÊý¡¢ÒýÓòÎÊý¡¢Êä³ö²ÎÊý¡¢¾Ö²¿±äÁ¿)¾²Ì¬(static) Èç public static int x; Ò»µ©¾²Ì¬±äÁ¿ËùÊôµÄÀà±»×°ÔØ£¬Ö±µ½°üº¬¸ÃÀàµÄ³ÌÐòÔËÐнáÊøÊ±ËüÒ»Ö±´æÔÚ¡£·Ç¾²Ì¬£º²»´øÓÐstaticÐÞÊηûÉùÃ÷µÄ±äÁ¿³ÆÎªÊµÀý±äÁ¿£¬Èçint a ;³£Á¿(attributes constnt-modifiers CONST type contant-declarators)ÆäÖУ¬ÐÞÊηûconstant-modifier ¿ÉÒÔÊÇ£ºnew,public,protected,internal,privatetype±ØÐëÊÇÒÔÏÂÖ®Ò»:sbyte,byte,short,ushort,int,uint,long,ulong,char,float,double,decimal,bool,string,ö¾Ù(enum),ÒýÓÃÀàÐÍ(reference-type);contant-declarators±íʾ³£Á¿µÄÃû×Ö¡¡¡¡È磺public const double x=1.0;+ ÔËËã·û¼È¿É×÷ΪһԪÔËËã·ûÒ²¿É×÷Ϊ¶þ½øÖÆÔËËã·û¡£+expr1 or expr1+expr2Console.Writeline(+5) //Return 5Console.Writeline(5+5) //Return 10Console.Writeline(5+.5) //Return 5.5Console.Writeline(“5”+“5”) //Return 55Console.Writeline(5.0+“5”) //Return 55¡¡¡¡×Ô¶¯½«DOUBLEת»»³ÉSTRING- ÔËËã·û¼È¿É×÷ΪһԪÔËËã·ûÒ²¿É×÷Ϊ¶þ½øÖÆÔËËã·û¡£-expr1 or expr1-expr2int a=5Console.Writeline(-a); //return -5Console.Writeline(a-1); //return 4* ³Ë·¨ÔËËã·û (*) ¼ÆËã²Ù×÷ÊýµÄ³Ë»ý¡£ËùÓÐÊýÖµÀàÐͶ¼¾ßÓÐÔ¤¶¨ÒåµÄ³Ë·¨ÔËËã·û¡£expr1*expr2Using Systemclass Test{ Public static void main() { Console.Writeline(5*2); //return 10 Console.Writeline(-.5*.2) //return -0.1 Console.Writeline(-.5m*.2m) //return -0.10 СÊýÀàÐÍ }}/ ³ý·¨ÔËËã·û (/) Óõڶþ¸ö²Ù×÷Êý³ýµÚÒ»¸ö²Ù×÷Êý¡£ËùÓÐÊýÖµÀàÐͶ¼¾ßÓÐÔ¤¶¨ÒåµÄ³ý·¨ÔËËã·û¡£expr1/expr2Console.Writeline(-5/2) //return -2Console.Writeline(-5.0/2) //return -2.5% Ä£ÊýÔËËã·û (%) ¼ÆËãµÚ¶þ¸ö²Ù×÷Êý³ýµÚÒ»¸ö²Ù×÷ÊýºóµÄÓàÊý¡£ËùÓÐÊýÖµÀàÐͶ¼¾ßÓÐÔ¤¶¨ÒåµÄÄ£ÊýÔËËã·û¡£expr1%expr2Console.Writeline(5%2) //return 1 intConsole.Writeline(-5%2) //return -1 intConsole.Writeline(5.0%2.2) 
Ïà¹ØÎĵµ£º
2£©ÈçºÎ´´½¨Ò»¸öxmlÎĵµ
ÓÉÓÚxmlʵÖÊÒ²Ö»ÊÇÒ»¸öÎı¾Îļþ£¬ËùÒÔ×î¼òµ¥Äã¿ÉÒÔÖ±½ÓʹÓÃSystem.IOϵÄÀàÉú³ÉÒ»¸öÎļþ£¬²¢´æ´¢³ÉxmlÎļþ£¬µ±È»£¬ÄãÐèÒªÊÖ¶¯±£Ö¤¸ÃÎļþÐÎʽÁ¼ºÃ£¬±ÈÈç±ØÐëÓиùÔªËØ¡¢±ØÐëÓйرձêÇ©¡¢±ØÐëÕýȷǶÌ׵ȵȡ£
Èç¹ûÄãÀÁµÃ×Ô¼ºÈ¥ÏëÎļþµÄÐÎʽ£¬¿ÉÒÔʹÓÃSystem.XmlϵÄÀà¡£
Code
Xml ......
public class yzzSerialize
{
private yzzSerialize()
{ }
private static yzzCache cache = new yzzCache();
public static T GetfromXml<T>(string xmlpath, T t)
{
using (FileStream fs = new FileStream(xmlpath, FileMode.Open, FileAcces ......
ÏÈÌù´úÂë
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ref_and_Out_test
{
class Program
{
static void Main(string[] args)
& ......
ö¾Ù
¡¡¡¡Ã¶¾ÙÀàÐÍÉùÃ÷Ϊһ×éÏà¹ØµÄ·ûºÅ³£Êý¶¨ÒåÁËÒ»¸öÀàÐÍÃû³Æ¡£Ã¶¾ÙÓÃÓÚ“¶àÏîÑ¡Ôñ”³¡ºÏ£¬¾ÍÊdzÌÐòÔËÐÐʱ´Ó±àÒëʱÒѾÉ趨µÄ¹Ì¶¨ÊýÄ¿µÄ“Ñ¡Ôñ”ÖÐ×ö³ö¾ö¶¨¡£
¡¡¡¡Ã¶¾ÙÀàÐÍ£¨Ò²³ÆÎªÃ¶¾Ù£©Îª¶¨ÒåÒ»×é¿ÉÒÔ¸³¸ø±äÁ¿µÄÃüÃûÕûÊý³£Á¿ÌṩÁËÒ»ÖÖÓÐЧµÄ·½·¨¡£ÀýÈ磬¼ÙÉèÄú±ØÐ붨ÒåÒ»¸ö±äÁ¿£¬¸Ã±äÁ¿ ......
ÏëÌá¸ßc#±à³Ìˮƽ£¿ÏÂÃæÕâ50Ìõ¾Ñé²»¿É²»¶Á£¡
Ìá¸ßC#±à³ÌˮƽµÄ50¸öÒªµã
1.×ÜÊÇÓÃÊôÐÔ (Property) À´´úÌæ¿É·ÃÎʵÄÊý¾Ý³ÉÔ±
2.ÔÚ readonly ºÍ const Ö®¼ä£¬ÓÅÏÈʹÓà readonly
3.ÔÚ as ºÍ Ç¿ÖÆÀàÐÍת»»Ö®¼ä£¬ÓÅÏÈʹÓà as ²Ù×÷·û
4.ʹÓÃÌõ¼þÊôÐÔ (Conditional Attributes) À´´úÌæÌõ¼þ±àÒëÓï¾ä #if
5.×ÜÊÇΪ×Ô¶¨Ò ......