C# ÓïÑÔ µÚÒ»²¿·Ö ÃæÏò¶ÔÏó£¨Ê®¶þ£© ½Ó¿ÚµÄÓ¦ÓÃ
±¾ÕÂΪ½Ó¿Ú¿Î³ÌµÄ×ÛºÏÁ·Ï°¡£
±¾´ÎÁ·Ï°Õ¹Ê¾ÁËÒ»¸ö¼ò»¯µÄÒøÐÐÒµÎñÁ÷³Ì£¬ÌåÏÖÁËÒøÐкÍÓû§Êý¸ö½ÇÉ«µÄ¹Øϵ¡£¿´ÏÂͼ£º
ÕË»§ÀࣨAccount£©¶ÔÏó´æ´¢ÔÚÊý¾Ý¿âÀࣨDatabase£©¶ÔÏóÖУ»¼ÆËã»ú£¨Computer£©Àà¶ÔÏóÁ¬½Óµ½Êý¾Ý¿âÀà¶ÔÏóÉÏ£»ÒøÐйñ̨£¨BankCounter£©Àà¶ÔÏóÓµÓÐһ̨¼ÆËã»ú¶ÔÏó×÷Ϊ˽ÓгÉÔ±£¬ÀûÓøöÔÏó¶ÔÊý¾Ý¿â½øÐвÙ×÷£»ATM»ú£¨ATM£©Àà¼Ì³Ð×Ô¼ÆËã»úÀ࣬Æä¶ÔÏó¿ÉÒÔ¶ÔÊý¾Ý¿â¶ÔÏó½øÐвÙ×÷£»ÒøÐйñ̨Àà¶ÔÏó¿É´´½¨ÒøÐÐÓû§ÀࣨBankUser£©¶ÔÏó£¬Óû§Àà¶ÔÏó¿ÉÒÔ½øÐÐÈ¡¿î¡¢´æ¿îºÍתÕ˲Ù×÷¡£
GetMoneyable½Ó¿Ú±íʾ¶ÔÏó¾ß±¸È¡¿îÄÜÁ¦£»
SaveMoneyable½Ó¿Ú±íʾ¶ÔÏó¾ß±¸´æ¿îÄÜÁ¦£»
Transferable½Ó¿Ú±íʾ¶ÔÏó¾ß±¸×ªÕËÄÜÁ¦¡£
Óû§Àà¶ÔÏóÈ¡¿î²Ù×÷Ä¿±êΪÈÎÒâ·ûºÏGetMoneyable½Ó¿ÚµÄÀà¶ÔÏó£»´æ¿î²Ù×÷Ä¿±êΪÈÎÒâ·ûºÏSaveMoneyable½Ó¿ÚµÄÀà¶ÔÏó£»×ªÕ˲Ù×÷Ä¿±êΪÈÎÒâ·ûºÏTransferable½Ó¿ÚµÄÀà¶ÔÏó¡£
ÒøÐйñ̨ÀàʵÏÖÁËËùÓÐÈý¸ö½Ó¿Ú£»ATM¶ÔÏóʵÏÖÁËGetMoneyable½Ó¿ÚºÍTransferable½Ó¿Ú£¬¼´ATM»ú¿ÉÒÔÈ¡¿îºÍתÕË£¬²»ÄÜ´æ¿î¡£
¿´´úÂ룺
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace Edu.Study.OO.UseInterface {
7
8 /// <summary>
9 /// Õ˺ÅÀà
10 /// </summary>
11 public class Account {
12
13 /// <summary>
14 /// ÕË»§Ãû
15 /// </summary>
16 private string name;
17
18 /// <summary>
19 /// Õ˺Å
20 /// </summary>
21 private string accountNo;
22
23 /// <summary>
24 /// ÕÊ»§ÃÜÂë
25 /// </summary>
26 private string password;
27
28 /// <summary>
29 /// ÕË»§´æ¿î
30 /// </summary>
31 private int money;
32
33 /// <summary>
34 /// Á÷Ë®ºÅ£¬ÓÃÓÚÉú³ÉÕ˺Å
35 /// </summary>
36 private static int serialNo = 0;
37
38 /// <summary>
39 /// ÕË»§Ãû£¬Ö»¶Á
40 /// </summary>
41
Ïà¹ØÎĵµ£º
1.asp.netºô½Ðjs
Response.Write("<script language=javascript>");
&n ......
½ñÌì×öÏîÄ¿µÄʱºò£¬½«null´«ÈëOracleµÄ±íÖУ¬¾ÍÊDz»³É¹¦
¾¹ý³¢ÊԵóöÁËÁ½¸ö½â¾ö·½°¸£º
1.´«ÈëOracleDateTime.NULL
2.Nullable<DateTime> optime = DBNull.Value; ´«Èëoptime(¿ªÊ¼ÍøÉÏÕҵĴð°¸ÊÇNullable<DateTime> optime = null·¢ÏÖ»¹Êǻᱨ´í) ......
ÒÔÏ²ο¼ :http://msdn.microsoft.com/zh-cn/library/87d83y5b.aspx
½Ó¿Ú£¨C# ²Î¿¼£©
¸üУº2007 Äê 11 ÔÂ
½Ó¿ÚÖ»°üº¬·½·¨¡¢ÊôÐÔ¡¢Ê¼þ»òË÷ÒýÆ÷µÄÇ©Ãû¡£³ÉÔ±µÄʵÏÖÊÇÔÚʵÏÖ½Ó¿ÚµÄÀà»ò½á¹¹ÖÐÍê³ÉµÄ£¬ÈçÏÂÃæµÄʾÀýËùʾ£º
ʾÀý
interface ISampleInterface
{
void SampleMethod();
}
class Implem ......
/// <summary>
/// ±È½ÏÁ½·ùͼƬÊÇ·ñÒ»Ö£¨Ê¹ÓÃMarshal.ReadByte·½Ê½£©
/// </summary>
/// <param name="bitmap1">ͼƬ1</param>
/// <param name="bitmap2">ͼƬ2</param>
/// <returns>Èç¹ûÁ½·ùͼƬÏàͬ£¬·µ»Ø0£»Èç¹ûͼƬ1СÓÚͼƬ2£¬·µ»ØСÓÚ0µÄÖµ£»Èç¹ûͼƬ1´óÓÚÍ¼Æ ......
ÔÚC#3.0ÖÐÔö¼ÓÁËÒ»¸ö±äÁ¿ÉùÃ÷var£¬Õâ¸öÉùÃ÷ºÍJavaScriptµÄvarÀàËÆ£¬µ°Ò²²»Í¬¡£(*^__^*) ÎûÎû……
1.Ïàͬµã£¬Ëü¿ÉÒÔÓÃvarÀ´ÉùÃ÷ÈκÎÀàÐ͵ľֲ¿±äÁ¿¡£
2.²»Í¬µã Ëü½ö½ö¸æËß±àÒëÆ÷£¬¸Ã±äÁ¿ÐèÒª¸ù¾Ý³õʼ»¯±í´ïʽÀ´È·¶¨±äÁ¿µÄÀàÐÍ£¬¶øÇÒÖ»ÄÜÊǾֲ¿±äÁ¿¡£ ......