You are on page 1of 16

(0) .

NET Framework
- CLR + FCL
(1) CLR - Common Language Runtime
- ( ) MSIL
- Microsoft .NET Framework

(2) MSIL Microsoft Intermediate Language


- ,
.NET (C#, VB.NET .).
(3) FCL - Framework Class Library
-
- 1000

(4) ILASM ILDASM - .NET Framework


- ILDASM EXE/DLL
- ILASM EXE MSIL

(5) JIT - Just-In-Time Compiler


- , IL
- , IL .
- IL , -

(6) Assembly -
- , ,
- : , , I
- -

(7) assembly manifest -


- , ,
, , .
(8) GAC - Global Assembly Cache
- C:\ WINNT\assembly
- , .
- GAC GACUtil
(9) CTS - Common Type System
- Microsoft .NET Framework
- (, )

(10)
- System.Delegate,
- -
(11)

- , , , ..
- ,
(12) instantiation
- (.. ) .
(13) NameSpace -
- ,
(14) SDK - DbgCLR.exe
- :\Program Files\Microsoft.NET\SDK\v2.0\GuiDebug\
(15) Main ?
return

(16) managed code ?


- MSIL , ( C#),
- JIT
(17)
-

?

F1
View - Other Windows - Object Browser ( Ctrl+Alt+J )
H2Viewer -> .NET Framework SDK -> Class Library

(18) ?
- MS Visual Studio 2008 :
View \ Error list
(19) ?
- - private
- - internal
(20) private ?
-
(21) public ?
- ( )
(22) void ?
- ,
(23) :
ToString("C", System.Globalization.CultureInfo.CreateSpecificCulture("he
-IL"))
(24) ?

- ( Solution) -> Open -> Recourses


(25) Combo ?
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;

(26) partial ?
- (
- )

(27) value type and reference types ?


- (value) (, ),
- (reference) (, , ,
(28) ?
- Directory.GetFiles foreach
(29) ?
- OpenFileDialog.ShowDialog( )
(30) ?
- FolderBrowserDialog.ShowDialog( )
(31) - ?
- ,
(32) ?
- ToolTip.SetToolTip()
(33) Microsoft .NET Framework Redistributable ?
-
(34) ?
- #region #endregion
(35) ?
- ,
- tab

(36) ?
- , Ctrl-K, Ctrl(37) ?
- public protected
(38) / ?
- Ctrl-M, Ctrl-O
-

- Ctrl-M, Ctrl-L
- Ctrl-M, Ctrl-M

-
- /

(39) ?
- Ctrl + ]

(40) protected ?
- private,

(41) ?
- , public-
- (private, protected, internal).

(42) ?
- ,

(43) , ?
- set() , get()
- readonly (
(44) const ?
- , -
(45)
-

(46) , ?
- ClassName(type1 variable1):base(type2 variable2) {}
- ( varia
( variable1)
(47) , ?
- myClass (type1 x) : this( x ) {}
- (this), .
(48) is ?
- true,
.
(49) - ?
- - virtual
- - override
(50) ?
- using = System.________________._______________.________

(51) GUID (Globally Unique Identifier) ?


- 128- , MAC-
- (CLSID), (IID), (LIBID)
(52) ?
int[,] A = new int[4,2];
int[] A = {1,2,3,4};
int[] A = new int[5];

(53) MSDN ?
- Visual Studio Express : MSDN Express Libra

(54) enum () ?
- :
public enum Months {January=1, February, March, April, ... }
- : Months.January
- ( )
(55) ?
- ,
(56) 2 ?
-
(57)
-

?
:
delegate
_
_()
(
(.. ):
_ __ = new _(_

__ += _
- (.. ): __()

(58)
- Delegate[] GetInvocationList()
(59)
- (: )
-
(60)

static
( ) s t a t i c ,

static-
, static-,

(61) internal ?
- , -
- ( exe-

(62) ?
- ,
- M() -,
(63) ?
-

(64) ?
1. :
modifier
delegate
_
_( _
2. :
modifier
event
_
_
3. , :
if( _ = null ) {_( )}
4. , :
modifier
_
_( )
5. :
_ += new _( _ )
6. , ( ).
(65) ?
str = str.Remove(index, 1).Insert(index, newSymb.ToString());
(66)
-

System.Text.StringBuilder ?

.. (
System.Text.StringBuilder

- 7 ( 25 )
- http://msdn.microsoft.com/ru-ru/magazine/cc163670 28en-us 29.aspx

(67) - ?
- . , ,
- , , -, .
(68)
-

XML <summary> ?
Intellisence
/// VS

<para> </para>

(69) ?
- exe-
- : Main(strin
(70) ?
- NotifyIcon:
http://msdn.microsoft.com/ru-ru/library/system.windows.forms.notifyicon 
28VS.90 29.aspx

(71) , , .. ?
- Format(): "C" , ".00"
- "#.##" - ,
- [. MSDN] Composite Format String :
http://msdn.microsoft.com/en-us/li
brary/txafckwd.aspx

(72) s ?
i = Int32.Parse(s) - 3 : null, ,
i = Convert.ToInt32(s) - 2 : ,
TryParse(s, out i) - , false true
i = (int)Convert.ChangeType(s, TypeCode.Int32) - 2 :

(73) ?
- Debug
(74) BAT-
- .../csc.exe / project.cs
- /target:winexe
CMD-
- /debug+

(75) dll ?
- csc
/target:library
/out:library_name.dll
file1.cs
fil
e2.cs
- csc
/out:filename.exe
/reference:library_name.dll
file.cs
- dll-
- filename.exe

library_name.dll

(76) <out> <ref> ? ?


- ,

- , <ref>
(77)
-

Try Catch Finally Throw ?


Try {...}
- {...}
Catch (System.) {...}
- {...}
Finally {...}
- Try {...}
Throw new System.() - ,

(78) vce- Microsoft pdf ?


http://www.examcollection.com/70-562.html
http://www.examcollection.com/forum/Exam_Formatter_f19.html
http://www.4shared.com/
- Install CutePDF (free of charge). Open the VCE in the Designer. Print
to the CutePDF Writer

(79) ArrayList ?
-
(80) IEnumerator ?

(81)
-

,
foreach
Current ( )
Reset ( ) MoveNext (

IComparable ?
, ..
int CompareTo(object o)
CompareTo() 0 - , >0 - > , <0

(82) Obj object ( integer) ?


int MyNumber = (int)Obj;
string MyNumber = Obj as string; ( )
(83)
-

(nested) , ?
, , ,


(84) ?
byte short int long float double decimal
(85) private ?
-
(86) ( ) ?
- - get set
- - get set new/override

(87) / ?
- get / set (
(88)
-

var ?
,
,
,

(89)
-

boxing/unboxing (/) ?
- object, :
ob
- object , :

(90) List<Type> ArrayList ?


- ArrayList , List, List<obje
(91) ?
-
- - ,

-
- -
(92)
-

, ?
,

,

(93)
-

?
() -
- : .
UML " Applying UML And

(94) (enum) ?
- (s /byte, u /short, u /int, u /long)
(95)
-

(Stack) ?
,
,
,

(96)
-

(Heap) ?
, ()

(97) ?
- sealed

(98) new override ?


- new, :
.. Child : Parent (Parent)Child.x() = Parent.x()
-
- override - - ,
.. Child : Parent (Parent)Child.x() = Child.x()
-
- override
(99)
-

?
, +
: _
__ this [int ]
: get{ return my_function() }
: set{ my_function(, value) }

(100) ?
- System.Diagnostics.Process
(101) (task bar) ?
- Form.ShowInTaskbar = false
(102) ?

, (
- ,
: interface { _ _1 {_) ;
interface ,

(103) ?
- , ,
(104) : y = 5+ ++x ?
- x
- y 6
(105) A B ?
if(A is B)

(106) MDI (Multiple document interface) ?


- -

(107) ?
- CLR (
- ,
( , , )
- : http://devway.ru/?p=15

(108) using ?
- Dispose() (
- Dispose() - ,
- , IDisposable
(109) A ?
- Array.Sort(A)
(110) A B ?
- int[] B = (int[] A.Clone())
(111) ?
const double A_bound = (double)max_val  0.8;
- , .

(112) DataTable ?
- :
MyDataTable.Rows.Add( 1,
- :
MyDataTable.Rows.Add( array ); array -
- :
MyDataTable.Rows[ ][/ ] =

(113) DataTable ?
- : MyDataTable.Select("", "
- : MyDataTable.Select("", "_
(114) primary key ?

- , ..
- NULL, .. -
(115) DataTable Windows Forms ?
- DataGridView:
DataGridView.DataSource = MyDataTable;
(116) [3,4] ?
- 3 4
(117) DataTable foreach ?
- foreach (DataRow row in MyDataTable.Rows) { foreach (var i in row.Item
Array) { ... = i } }
- foreach (DataRow row in MyDataTable.Rows) { foreach (DataColumn col in
MyDataTable.Columns) { ... = row[col] } }
(118) ItemArray DataRow ?
- object[], DataTable
- : myDataRow.ItemArray = myArray
- DataTable
(119) DataView ?
- DataTable
- DataTable DataView
(120) x += 7 ?
- () a 7
(121) ?
- Console.Write("\a");
(122)
Regex r = new
foreach(Match

for(Match m =
{string res =

Regex ?
Regex(" ", |);
m in r.Matches) {string res = m.Value}
r.Match(" "); m.Success; m = m.NextMatch())
m.Group[__]}

(123) Regex ?
{} {}
(124) RegularExpression ? -
- ,
- ( ) (
- http://msdn.microsoft.com/en-us/library/az24scfc 28v=VS.90 29.aspx
^ -
 -
. -
[xXyY] - "x", "X", "y" "Y"
[a-z] -

[0-9] -
[^xX] - "x" "X"
(|) -
\b\w+\b - , "",
x? - "x"
(1000)+ - "1000" 1 .
[a-z]  - ,
\2 - ,
\d{3} -
\D{3} -
[0-5]{2,4} - 2,3 4 , 0 5
(?<>\d\d) - , : \k<
(?:) - ""
[a-z-[c-e]] - "c", "d" "e".
\p{...} , . {P} -
/s - (, .)

(125) - ?
(
(126) reflection ?
-
(127) , ,
- , "this." + .

(128)
.
(129) ?
FileSystemWatcher

(130) " "


- Environment.NewLine
- "\r\n" - : \r  (Carriage return) \n  (New line, Paper feed)
(131) txt- ?
StreamReader SR = File.OpenText( "" );
while ( SR.EndOfStream ) {string s = SR.ReadLine()}

(132) : StreamWriter SR = new Str


(133) StreamReader FileStream ?


- StreamReader - ( StreamWriter), FileStream -
- StreamReader - , FileStream -

(134) File FileInfo ?


- File - ( ), FileInfo - (
- File , FileInfo -

(135) , , ?
- string[] MyArray = File.ReadAllLines( "" );
(136) ?
- : @" ""[^""]"" "
(137) ?
StreamReader reader = new StreamReader( "" ); int i;
while( (i=reader.Read()) = -1) {Console.Write( (char)i )}

(138) MatchEvaluator ?
- , Regex.Replace()
- : string MatchEvaluator(Match m)
-

(139) ( ) ?
- String.IsNullOrEmpty( my_string )
(140) Visual Studio ?
- Ctrl + I +
(141) IntelliSence ?
- Ctrl + J
(142) myDate ?
DateTime myDate = new DateTime(2000, 12, 14);
(143) FindAll ?
myList.FindAll( _ => _. == __ );
- : http://www.cyberforum.ru/csharp-net/thread109823.html
- - , bool
(144) (casting) ?
- , ( object o): int i = (int) o;

(145) ?
- ,
(146) , readonly ?
-

(147) get/set
- get
- private- ( )

(148) immutable () ?
- ,
- , , null - immutable

(149) ?
- static
-
-
(150) ?
- :

params [] myArray

(151) ref/out
- , .. -

(152) , ( ob
Array myArray

(153) , " " " "


- " " - " " ? - (,
- " " " " ? - (, -
(154) char[] myCharArray ?
string s = new String( myCharArray ); //
ch = s.ToCharArray(); //

(155) lock ?
- ( )
- , myArray "1": lock( my
- Monitor.Enter Monitor.Exit (System.Threadi

(156) checked / unchecked ?


- checked { x = ... } - ,
- - OverflowException
- checked
- unchecked , (

(157) ?
- (.. , ),
- : ( ) =>
- : "
- : http://www.albahari.com/nutshell/whatsnewcs30.aspx
- : http://www.cyberforum.ru/csharp-net/thread83660-print.html
- LINQ - O Reilly

(158) ?
- , readonly
- var:
var V = new { Amount = 108, Me
- ,

(159) ?
- (int x, y) :
myClass M = new myClass() {x=10, y=200};

(160) generic / ?
- , < >,
- generic- X:
myClass<myType> { myType X; }
- generic- : myClass<int> m = new my
- generic-: myFunc<myType>() {myType Y; return }

(161) Linq (Language Integrated Query) ? -


- ,
- Linq ( ~40)
-

(161) Extension Methods ( ) ?


- ,
- LINQ
- , :
_
static
_
( this

- ,

(162) "yield" (.: " ") ?


- , yield, IEnumerable
- foreach
- : yield return ;
- : yield break;
- http://msdn.microsoft.com/en-us/library/9k7k7cf0 28v=VS.90 29.aspx

(163) - - ?
- , -
- - ,
(164) Main() ?
- Debug -> Step Into
- Main()
(165) virtual ?
- ,
(166) , x Y ?
Y y = x as Y;
if (y = null) { // }

(167) "as" "is" ?


- as - ( ) null ( ),
- is - true false
- as is : (myExpression is SomeType) ? (SomeType) myExpress

(168) ?
- ( )
- :
BinaryFormatter ( ), XmlSerializer (XML) SoapFormatter

(169) XmlSerializer (XML) SoapFormatter (XML) BinaryFormatter ?


- XmlSerializer - XML-, private-
- SoapFormatter - generic-, DLL -
- BinaryFormatter - ( , XML),

(170) , ?
- [Serializable] ( )
- [NonSerialized] (

(171) ?
- System.Runtime.Serialization.Formatters.Binary [
- : FileStream fs = new FileStream( "_", FileMode.C
- : BinaryFormatter ser = new BinaryFormater(); [ XmlSerializer
) ]
- : ser.Serialize(fs, Object myObject);
- : fs.Close();
(172) object graph ( ) ?
- ,
(173) ?
- 1- IDeserializationCallback
- 2- void OnDeserialization(Object o) {}
(174) SoapFormatter ?
- 1 - Project - Add Reference - .Net - System.Runtime.Serialization.Formatt
ers.Soap
- 2 - using System.Runtime.Serialization.Formatters.Soap;