- ©«¤l
- 57
- ¥DÃD
- 7
- ºëµØ
- 3
- ¿n¤À
- 60
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWSXP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2011-4-9
|
¥»©«³Ì«á¥Ñ §b§b ©ó 2010-5-13 00:16 ½s¿è
§ÚÌ´N¨Ó¬Ý¬Ý´XºØ¸ê®Æ§ÎºAªº¾Þ§@¤è¦¡
- Byte ¹ê»Ú¤W¬O¤@Ó¦û¥Î¤@Óbyte°O¾ÐÅ骺¾ã¼ÆÈ,¨ä½d³ò¬O0~255 ¤]´N¬O 2 ªº 8 ¦¸¤è = 256 Ó¦ì¸m
¥ô¦ó¶W¹L³oÓ½d³òªº¾ã¼Æȳ£·|²£¥Í¤@Ó·¸¦ìªº¨Ò¥~,¨Ò¦p- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim x As Byte
- x = 255
- x = x + 1
- MessageBox.Show(x)
- End Sub
½Æ»s¥N½X ¦pªG§A¬O¤@¶}©l´N«ü©w x = 256 , ¨º½sĶ¾¹´N¨Sªk½sĶ(²{¥Nªº½sĶ¾¹¤]°µ±o¤Ó¥D°Ê¤F)
- SByte ³oÓ¸ê®Æ«¬ºA¤]¬O¤@Ó¦û¥Î¤@Óbyte°O¾ÐÅ骺¾ã¼ÆÈ,¤£¹L©w¸qªº½d³ò¬O−128 ¨ì 127,¦]¬°¥L¥i¥H¦s¨ú¦³±at¼Æªº²Å¸¹
©Ò¥H²Ä¤@Óbit¨ä¹ê¨Óªí²{¼ÆȪº¥¿tªº,¦Ó0³oӼƦb³o¸Ì³Q©w¸q¬°¥¿¼Æ¦]¦¹²Ä¤@Óbit´N¬O0(³o¸Ìªº0©M¼Æ¾Ç¤Wªº©w¸q¬O¤£¤@¼Ëªº)
- Short ©ÎªÌ¬O .NetFramework ¤¤ªº Int16 ,¸Ó«¬ºA¦û¥Î¤GÓbytes°O¾ÐÅéªÅ¶¡,©w¸q¬°±q−32,768 ¨ì 32,767 ªº³sÄò¾ã¼Æ
- Integer ©ÎªÌ¬O .NetFramework ¤¤ªº Int32 ¸Ó«¬ºA¦û¥Î¥|Óbytes°O¾ÐÅéªÅ¶¡,©w¸q¬°±q−2,147,483,648 ¨ì 2,147,483,647ªº³sÄò¾ã¼Æ
- Long ©ÎªÌ¬O .NetFramework ¤¤ªº Int64 ¤@Ó¦û¥Î8 bytes°O¾ÐÅéªÅ¶¡,½d³ò±q−9,223,372,036,854,755,808 ¨ì 9,223,372,036,854,755,807
ªº³sÄò¾ã¼Æ
- UShort ¤@Ó¦û¥Î2 bytes°O¾ÐÅ骺ªÅ¶¡,½d³ò±q 0 ¨ì 65,535 ªº³sÄò¾ã¼Æ
- UInteger ¤@Ó¦û¥Î 4 bytes°O¾ÐÅ骺ªÅ¶¡,½d³ò±q 0 ¨ì 4,294,967,295 ³sÄò¾ã¼Æ
- ULong ¤@Ó¦û¥Î 8 bytes°O¾ÐÅ骺ªÅ¶¡,½d³ò±q 0 ¨ì 18,446,744,073,709,551,615 ³sÄò¾ã¼Æ
- Single ¤@Ó¦û¥Î 4 bytes°O¾ÐÅ骺ªÅ¶¡,¥iªí¥Üt¼Æ−3.402823E38 ¨ì −1.401298E-45 ,¥¿¼Æ1.401298E-45 ¨ì 3.402823E38,0µLªkºë·Çªí¥Ü
,¥i¥H¬O«D±`¤p,¦ý¤£¬O0
- Double ¤@Ó¦û¥Î 8 bytes°OÅéªÅ¶¡,¥iªí¥Üt¼Æ−1.79769313486232E308 ¨ì −4.94065645841247E-324
¥¿¼Æ4.94065645841247E-324 ¨ì 1.79769313486232E308
¤p¼Æ¹Bºâ¤@ª½¬O¹q¸£ªº°ÝÃD©Ò¦b,¦]¬°¦b¦UÓ¶i¦ì¶¡µLªk¶i¦æ§¹¥þªºÂà´«,¥H¤U¨Ò¤l- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim x As Single
- x = 1 / 3
- MessageBox.Show(x * 100000)
- End Sub
½Æ»s¥N½X Åã¥Ü¥X33333.34 ,©M§Ú̪º´Á±æ¤£¦X, ©Î³\¦³¤H¬O¥i¤¹³\ªº,¦ý¹ê»Ú¤Wºë«×¬O®t«Ü¦hªº
¦]¦¹§ÚÌ¥i¯à·|§Q¥Îdoubleºë«× ,ÁÙ¦³¤@ÂI¬O,¦pªG§A¥Î¤p¼Æ¨Ó°µ°j°éªºindexp¼Æ,«Ü®e©ö¥X¿ù¦ý·|§ä¤£¨ì¿ù»~,³oºØ¨Æ´N´¿µo¥Í¹L
¨Ò¦p- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim x As Single
- Dim count As Integer
- x = 1
- While x < 1.00001
- x = x + 0.000001
- count += 1
- End While
- MessageBox.Show(count)
- End Sub
½Æ»s¥N½X ³oÀ³¸Ón¶]´X¦¸
- Decimal ¹ê»Ú¤W³o¬O¤@Ó¦û¥Î16 bytes °O¾ÐÅ骺¼ÆÈ,¦Ó¥B¬O¤@Ó¥H10¬°©³ªº«ü¼Æ¨ç¼Æ¨Ó¶i¦æ¤ñ¨Ò½Õ¾ã,¬Ý°_¨Ó¤Ó¼Æ¾Ç¤Æ¤F,Á|Ó¨Ò¤l
- Option Strict On
- Option Explicit On
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim a As Decimal = 5262.2358D
- Dim b As Decimal = 12.62354D
- Dim c As Decimal
- c = a * b
- MessageBox.show(c.ToString)
- End Sub
- End Class
½Æ»s¥N½X ¹ê»Ú¤W a ³oÓ¼ÆÈ ¦b«ü©w¬°5262.2358®É¦pªG¤£¥[D¨º¹ê»Ú¤W¬O·|¥H¤º©w¬°doubleªº«¬ºA¨Ó«ü©w,¦Ó³o¼Ëªº¸Ü´N·|µo¥Í«¬ºA¨S¦³Âà´«¦Ó§Î¦¨¿ù»~
,¦Ó¥B·í½sĶ¾¹¶}©l®É·|±Na¼¤W10ªº4¦¸¤èÅܬ°52622358¾ã¼Æ,¤@¼Ëªº12.62354·|¼¤W10ªº5¦¸¤è«K¬°¾ã¼Æ,¦A¶i¦æ¬Û¼,±o¨ìµ²ªG«á¦A°£©ó10ªº9¦¸¤è¨Ó±o¨ìµª®×
- Boolean ¥¬ªL, ¤£¬Otrue(-1) ´N¬O False(0)
- Date ¤é´Á
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim date1 As Date = #1/1/2010#
- Dim date2 As Date = #1/2/2010#
- MessageBox.Show((date2 - date1).ToString)
- End Sub
½Æ»s¥N½X - Char ¦r¤¸ ¨ä«Å§i¤è¦¡©M«ü©w¤è¦¡¦p¤U
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim x As Char = "a"c
- MessageBox.Show(x)
- End Sub
½Æ»s¥N½X - String ¦r¦ê
- ³Ì«á¤@ºØ«¬ºA§Ṳ́¶²Ð¤@¤U,¥s¨Ï¥ÎªÌ¦Û©w«¬ºA,
³oºØ«¬ºA¸g¹L¤Fµ{¦¡»y¨¥ªº´X¦¸Åܲ,³Ì«á²×©ó½T©w¤F¦WºÙ
¥s°µÃþ§O,Ãþ§O¬Oª«¥ó¾É¦Vªº°ò¦,¦bWindowsForm¤¤,§A¤@©w¬O¦bÃþ§O¤º¼gµ{¦¡- Public Class Form1
- End Class
½Æ»s¥N½X ¹ï§a,§Aªºµ{¦¡½X¬O¼g¦bForm1¤º§O¤º
¨ì¤F¤µ¤Ñ,´X¥G¨S¦³¤@ºØ¶}µo«¬ªºµ{¦¡»y¨¥¤£¬Oª«¥ó¾É¦V¦¡ªº,§Ú«üªº¬O¦U¥Dn¬y¦æªºµ{¦¡»y¨¥¦Ó¨¥
§Q¦p
c ---> c++ (c with class) ,³o·íµM¬O¤GºØ¤£¦P»y¨¥
, .net ªº©Ò¦³¶}µo»y¨¥À³¸Ó³£¬O(Å¥»¡¦³fortran,¦ý¤£ª¾¦³µL¤ä´©)
·íµM,visual basic.net ©M¥H«eªºvisual basic6 ¤w¸g§¹¥þ¤£¦P,
¨º»òª«¥ó¾É¦V¦³¦ó¥Î³B,¬°¤°»ò¬Oµ{¦¡»y¨¥ªº¬y¦æÁͶÕ
¨º¬O¦]¬°,ª«¥ó¾É¦V¨Ï±o§Ú̼gµ{¦¡ªº¤è¦¡§ó¬°±µªñ¤HÃþªº«ä¦Ò¼Ò¦¡
§Ṳ́£¥Î¦b¥h¦Ò¼{¨º¨Ç´²¦b¦U¦aªºµ{¦¡½X¦p¦ó¨ú±o,©ÎªÌ¬O¤w¸g³Q§ÚÌ¿ò§Ñªº,¥un¬O¤@¬Ý¦r±´N¥i¥Hª¾¹D¦p¦ó¨Ï¥Î
,¦]¬°¥L¬O°Ñ¦Ò¤H̦b²{¹ê¨Æ¬ÉÆ[¹î¨Æª«±o¨ìªººÞ²z¼Ò¦¡
¨Ò¦p,§Ú̦b°Ý¸ô®É,³q±`³Q°Ýªº¤H·|»¡,²Ä´XÓ¬õºñ¿On¥ªÂà,³o´N¬Oª«¥ó¾É¦V
²Ä´XÓ¬õºñ¿O´N¦³¬õºñ¿O©M¼Æ¦r,§A§â¼Æ¦r©M¬õºñ¿Oµ²¦X¤F´N¬O§AÄ~©Ó¤F¬õºñ¿O¥~¥[¤W¤@Ó½s¸¹
´N³o»ò²³æ,¨S¤°»ò¯«¯µ¤§³B,¦A«ç»ò¤j«¬ªºµ{¦¡½X,³£ÁÙ¬O¥Ñ³Ì¤pªº³æ¦ì²Õ¦¨,¦³µÛ³Ì²³æªº²Ó³¡
¨º»ò§Ú̧â¤W±ªºµ{¦¡§ï¼g¤@¤U´NÅܦ¨¤F- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim ®ÉÄÁ As New ®ÉÄÁ
- MessageBox.Show("²{¦b®É¨è" & ®ÉÄÁ.®É & "®É" & ®ÉÄÁ.¤À & "¤À" & ®ÉÄÁ.¬í & "¬í")
- End Sub
- End Class
- Public Class ®ÉÄÁ
- Inherits Object
- Public ReadOnly Property ®É() As Integer
- Get
- Return Now.Hour
- End Get
- End Property
- Public ReadOnly Property ¤À() As Integer
- Get
- Return Now.Minute
- End Get
- End Property
- Public ReadOnly Property ’() As Integer
- Get
- Return Now.Second
- End Get
- End Property
- End Class
½Æ»s¥N½X
|
|