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) 
Ïà¹ØÎĵµ£º
RT¡£ÏÈÌù´úÂë
C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Value_Ref_test1
{
class Program
{
static void Main(string[] args)
{
point a = new point (10,10) ;
point b = a;
......
ÏÈÌù´úÂë
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ref_and_Out_test
{
class Program
{
static void Main(string[] args)
& ......
1.¾²Ì¬³ÉÔ±ºÍ·Ç¾²Ì¬³ÉÔ±µÄÇø±ð£¿
2.const ºÍ static readonly Çø±ð£¿
3.extern ÊÇʲôÒâ˼£¿
4.abstract ÊÇʲôÒâ˼£¿
5.internal ÐÞÊηûÆðʲô×÷Óã¿
6.sealed ÐÞÊηûÊǸÉʲôµÄ£¿
7.override ºÍ overload µÄÇø±ð£¿
8.ʲôÊÇË÷ÒýָʾÆ÷£¿
9.new ÐÞÊηûÊÇÆðʲô×÷Óã¿
10.this ¹Ø¼ü×ֵĺ¬Ò壿
11.¿ÉÒÔʹÓóéÏóº¯Ê ......
ʹÓà PlaySound ÔÚÒÆ¶¯É豸Éϲ¥·ÅÉùÒôÎļþ¡£´Ë´úÂëʹÓà System.Runtime.InteropServices
µ÷Óà Compact Framework µÄ CoreDll.DLL µÄ PlaySound ·½·¨
¹ØÓÚ²¥·ÅʵÏÖ£º
//²¥·Å±êÖ¾
private enum Flags
{
&n ......
ö¾Ù
¡¡¡¡Ã¶¾ÙÀàÐÍÉùÃ÷Ϊһ×éÏà¹ØµÄ·ûºÅ³£Êý¶¨ÒåÁËÒ»¸öÀàÐÍÃû³Æ¡£Ã¶¾ÙÓÃÓÚ“¶àÏîÑ¡Ôñ”³¡ºÏ£¬¾ÍÊdzÌÐòÔËÐÐʱ´Ó±àÒëʱÒѾÉ趨µÄ¹Ì¶¨ÊýÄ¿µÄ“Ñ¡Ôñ”ÖÐ×ö³ö¾ö¶¨¡£
¡¡¡¡Ã¶¾ÙÀàÐÍ£¨Ò²³ÆÎªÃ¶¾Ù£©Îª¶¨ÒåÒ»×é¿ÉÒÔ¸³¸ø±äÁ¿µÄÃüÃûÕûÊý³£Á¿ÌṩÁËÒ»ÖÖÓÐЧµÄ·½·¨¡£ÀýÈ磬¼ÙÉèÄú±ØÐ붨ÒåÒ»¸ö±äÁ¿£¬¸Ã±äÁ¿ ......