. 6
1 1 C#. 7
1.1 .. 7
1.2 . 7
1.3 .. 13
1.4 . 19
1.5 . 20
1.6 .. 20
2 2 .. 21
2.1 .. 21
2.2 . 21
2.3 .. 51
2.4 . 55
2.5 . 55
2.6 .. 55
3 3 ADO.NET. 56
3.1 .. 56
3.2 . 56
3.3 .. 62
3.4 . 74
3.5 . 74
3.6 .. 75
4 4 Fluent NHibernate. 76
4.1 .. 76
4.2 . 76
4.3 .. 86
4.4 . 104
4.5 . 105
4.6 .. 105
5 5 ASP.NET. 106
5.1 .. 106
5.2 . 106
5.3 .. 121
5.4 . 143
5.5 . 144
5.6 .. 144
6 6 . 145
6.1 .. 145
6.2 . 145
6.3 .. 149
6.4 . 162
6.5 . 163
6.6 .. 163
- , , web- . - , . , , , , . , , , .
, , web- .NET. , ADO.NET , Fluent Hibernate - , ASP.NET web-, Unit Testing Framework , .NET, .
, , .NET, Java. , NHibernate Hibernate, , ASP.NET Java- Java Server Faces. , .NET, Java.
|
|
, . , - Data Acces Object, Factory. - .
1 1
C#
#, C#.
.NET
- , , , ..
Microsoft.NET (.NET Framework) , Windows, ( CLR) . .NET :
- Common Language Specification (CLS);
- Microsoft Intermediate Language (MSIL);
- Common Language Runtime (CLR);
-.NET Framework Class Library (.NET FCL).
CLS (Common Language Specification) . , .NET Framework. , CLS, , CLS. , CLS ( Visual Basic, Visual C++, Visual C#), . CLS Microsoft.NET.
CLR (Common Language Runtime) - .NET Framework. CLR . () (, CLR, , ), .
( ) () , :
- ( );
- ;
- ;
- ;
- ;
- ( );
- , ;
- ( COM- );
- (, ..).
, CLR , .
CLR :
- (mscoree.dll);
- (mscorlib.dll).
mscoree.dll. , (.exe) ( .dll LoadLibrary ) CLR. CLR , :
|
|
- ;
- ;
- ( ; ; );
- ;
- (IL) ( );
- , ;
- , .
.NET FCL (.NET Framework Class Library) - , CLS , (-), .NET.
.NET , .
.NET FCL .NET.
.NET FCL .NET-, , . 4000 . , :
1. () , ( .NET );
2. (Windows Form);
3. Web- Web- ASP.NET (Web Forms);
4. , XML Internet- (FTP; HTTP; SMTP; SOAP);
5. , (ADO.NET).
.NET- , .NET , CLS.
MSIL (Microsoft Intermediate Language IL Intermedia Language) .NET. .NET , CLS. , CLS MSIL. , MSIL. CLS, , , IL .
MSIL .
MSIL . , .
- , , , , .
. , , Interface Definition Language (IDL). .
, :
1. . . ;
2. ;
3. ( ) ;
4. (IntelliSense) (MS Visual Studio.NET).
, MSIL :
- Visual Basic;
- Visual C++;
- Visual C#;
|
|
- 20 CTS- .
1.2.2 C#
. , , .
(Java, C, C++, Pascal) . , , . - , , . , . C# .
, . . , ArrayList, Hashtable, Stack Queue, - . , .
.NET Framework : , , , . , , , , , -. : objct.
, , . , , object. System.Collections.
- . , , , . System.Collections.Specialized.
Collections API BitArray. BitArray ( ) AND XOR, , , . BitArray System.Collections.
, , , . . , , . . System.Collections.Generic.
. , System.Collections.Concurrent.
System.Collections.ObjectModel , .
|
|
, IEnumerator IEnumerable, IEnumerator<T> IEnumerable<T>. . , . IEnumerable, , IEnumerator IEnumerator<T>.
, , , . foreach .
, . , , foreach.
: ++, , , , (Standard Template Library STL), ++. , ++ , # . Java. Collections Framework Java, # .
1.2.3 #
, , , . . , , . . System.Collections.Generic.
# 1.1.
1.1 C#
List<T> | , . , |
HashSet<T> | |
LinkedList<T> | |
Dictionary<TKey, TValue> | |
Queue<T> | , FIFO |
SortedDictionary<TKey, TValue> | "-", |
SortedList<TKey, TValue> | "-", |
SortedSet<T> | |
Stack<T> | , LIFO |