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¡¢ÓÃMySQLDriverCSÁ¬½ÓMySQLÊý¾Ý¿â
ÏÈÏÂÔØºÍ°²×°MySQLDriverCS£¬µØ
Ö·£º
http://sourceforge.net/projects/mysqldrivercs/
ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½
MySQLDriver.dll
£¬È»ºó½«
MySQLDriver.dll
Ìí¼ÓÒýÓõ½ÏîÄ¿ÖÐ
×¢£ºÎÒÏÂÔØµÄÊǰ汾ÊÇ
MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe
using
S ......
//ÒÔÏÂÀ´×Ô:http://msdn.microsoft.com/zh-cn/library/sf985hc5.aspx
abstract£¨C# ²Î¿¼£©
¸üУº2007 Äê 11 ÔÂ
abstract ÐÞÊηû¿ÉÒÔºÍÀà¡¢·½·¨¡¢ÊôÐÔ¡¢Ë÷ÒýÆ÷¼°Ê¼þÒ»ÆðʹÓá£ÔÚÀàÉùÃ÷ÖÐʹÓà abstract ÐÞÊηûÒÔָʾij¸öÀàÖ»ÄÜÊÇÆäËûÀàµÄ»ùÀà¡£±ê¼ÇΪ³éÏó»ò°üº¬ÔÚ³éÏóÀàÖеijÉÔ±±ØÐëͨ¹ý´Ó³éÏóÀàÅÉÉúµÄÀàÀ´ÊµÏÖ¡£
ʾÀý ......
±¾ÊéÊÇ΢Èí¼¼ÊõÅàѵͳ±à½Ì²ÄÖ®Ò»£¬¶Ô±à³ÌÓïÑÔC#½øÐÐÁËÏêϸµÄ½éÉÜ¡£ C#ÊÇ»ùÓÚ΢ÈíÏÂÒ»´ú²Ù×÷ƽ̨£®NETµÄȫеÄÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ¡£ËüÔÚ±£³ÖÁËC+ÖÐÊìϤµÄÓï·¨µÄͬʱ£¬Ìí¼ÓÁË´óÁ¿µÄ¸ßЧ´úÂëºÍÍêÈ«ÃæÏò¶ÔÏóÌØÐÔ£¬ÒÔ¼°¸ü¸ßµÄ¿É¿¿ÐԺͰ²È«ÐÔ¡£C#ÓïÑÔ½«ÔÚ±£³ÖC£¯C++Áé»îÐԵĻù´¡ÉÏΪ³ÌÐòÔ±´øÀ´¸ü¸ßЧµÄ¿ª·¢·½Ê½¡£Ëü²»½öÄÜÓÃÓ ......
´ÓContainerControlÀà¼Ì³ÐµÄ×ÓÀà×÷ΪÈÝÆ÷´°Ì壬¿ÉÒÔÈÝÄɳýFormÀà¶ÔÏóÍâµÄÆäÓà´°Ìå¶ÔÏó¡£
ÔÚËùÓÐÈÝÆ÷´°ÌåÄÚ£¬×î»ù±¾µÄ¾ÍÊǶ¥¼¶ÈÝÆ÷FormÀàÒÔ¼°Ãæ°åÈÝÆ÷PanelÀà¡£ÕâÁ½ÕßµÄÖ÷񻂿±ðΪ£ºÇ°Õß¾ßÓÐWindows±ê×¼¿ò¼Ü£¨±êÌâÀ¸£¬×î´ó»¯¡¢×îС»¯ºÍ¹Ø±Õ°´Å¥£¬´°Ìå±ß¿ò£¬¿Éµ÷Õû³ß´ç£©£¬²¢ÇÒ¿ÉÒÔ¶ÀÁ¢´æÔÚ£»ºóÕßÖ»ÊÇÒ»¿éÇøÓò£¬²¢ÇÒ±ØÐëÒÀ¸½ ......
C#»ñÈ¡×Ö·û´®µÄ³¤¶È
×÷Õߣºylclass À´Ô´£º²©¿ÍÔ° ·¢²¼Ê±¼ä£º2009-10-30 16:25 ÔĶÁ£º193 ´Î ÔÎÄÁ´½Ó [ÊÕ²Ø]
1¡¢ ʹÓÃg.MeasureString£¨£©»ñµÃ
ʹÓÃMeasureString²âÁ¿³öÀ´µÄ×Ö·û¿í¶È£¬×ÜÊDZÈʵ¼Ê¿í¶È´óһЩ£¬¶øÇÒËæ×Å×Ö·û ......