Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Observer ¹Û²ìÕßģʽ £¨HeadFirstÉè¼Æģʽ c#£©

Observer.cs
using System;
using System.Text;
using System.Collections.Generic;
namespace Observer
{
   
    public interface ISubject
    {
        void RegisterObserver(IOvserver o);
        void RemoveObserver(IOvserver o);
        void NotifyObserver();
    }
    public interface IOvserver
    {
        void update(float temp, float humidity, float pressure);
    }
    public interface IDisplayElement
    {
        void display();
    }
    public class WeatherData:ISubject
    {
        private List<IOvserver> obList;
        private float temperature;
        private float humidity;
        private float pressure;
        public WeatherData()
        {
            obList = new List<IOvserver>();
        }
        public void RegisterObserver(IOvserver o)
        {
            obList.Add(o);
        }
        public void RemoveObserver(IOvserver o)
        {
            if (obList.IndexOf(o) >= 0)
            {
   &nb


Ïà¹ØÎĵµ£º

C#´ò°üSQLÊý¾Ý¿â²¿Êð°²×°


²Î¿¼¡¶ASP.NETÓëSQLÒ»Æð´ò°ü²¿Êð°²×°¡·
£¬ÕâƪÎÄÕÂÊÇÕë¶ÔVB.NETÓëSQL Ò»Æð´ò°üµÄ,µ«ÊÇÎÒʹÓõÄÊÇC#,µ±È»Ö»ÒªÐÞ¸ÄÒ»ÏÂÖ÷Òª°²×°Àà¿â¾ÍÐÐÁË!C#µÄÀà¿â´úÂëÈçÏÂ:DBCustomAction.cs
using System;
using System.Collections;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Configuration.Inst ......

C#´´½¨XML

1 using System;
 2 using System.Collections;
 3 using System.Configuration;
 4 using System.Data;
 5 using System.Linq;
 6 using System.Web;
 7 using System.Web.Security;
 8 using&nbs ......

C#ʵÏÖAccessµ¼Èëµ¼³öExcel

Ò»¡¢Access´ÓExcelÖе¼ÈëÊý¾Ý
1.Óõ½µÄExcel±íµÄ¸ñʽ¼°ÄÚÈÝ
 
ʵÏÖ
 OleDbConnection con = new OleDbConnection();
try
{
OpenFileDialog openFile = new OpenFileDialog();//´ò¿ªÎļþ¶Ô»°¿ò¡£
openFile.Filter = ("Excel Îļþ(*.xls)|*.xls") ......

c#:¶¨ÒåÌØÐÔ

c#±à³Ì»ù´¡Ö®¶þ£ºÌØÐÔ ÕâÀïµÄÌØÐÔÇø±ðÓÚÊôÐÔ£¬ËäÈ»msdnÖÐËƺõ²¢Ã»ÓÐÇø±ð¶þÕß¡£
ÊôÐÔ£ºÊÇÃæÏò¶ÔÏó±à³ÌµÄ»ù±¾¸ÅÄÌṩÁ˶Ô˽ÓÐ×ֶεķÃÎÊ·â×°£¬ÔÚC#ÖÐÒÔgetºÍset·ÃÎÊÆ÷·½·¨ÊµÏֶԿɶÁ¿ÉдÊôÐԵIJÙ×÷£¬ÌṩÁË°²È«ºÍÁé»îµÄÊý¾Ý·ÃÎÊ·â×°¡£
ÌØÐÔ£º¹«¹²ÓïÑÔÔËÐÐʱÔÊÐíÌí¼ÓÀàËƹؼü×ÖµÄÃèÊöÉùÃ÷£¬½Ð×öattributes, Ëü¶Ô³ÌÐòÖеÄÔ ......

130µÀc#ÃæÊÔÌâ


1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£ 
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£ 
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£ 
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
 
 
2 .ÁоÙASP.N ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ