. adhoc.

Python.

Pandas.

Python

Matplotlib

Python. unittest

Python

C. 9. .

C – . , , C.

github-.

– () . ( C) ( Haskell,F,Clojure).

. : , .. . , , .

– , .

:

, . , , , . , , (, , ), , .

, , . , , . .

, , , . , :. , .. . , , ( ).

, , . adhoc. , .Adhoc (), ( ) .

C . , , C.

C class , . , , .

, ,. . , . , , , ( ).

class DemoClass // int field = 0; // public int Property get;set // public void Method() Console.WriteLine(Method);

, .

, , . , , . , , int .

, , , ..

, (, , ).

C :public,private,protected,internal,protected internal,privateprotected. publicprivate, .

: , ;

: , , .

: , .

: , .

, private.

, new. , .

DemoClass:

:

, , :

, :

public DemoClass(int field) this.field = field; public DemoClass(int field, int prop) this.field = field; Property = prop;

, , . , .

new. DemoClass:

, :

DemoClass d2 = new DemoClass(1); d2.Method(); // field: 1, Property: 0 DemoClass d3 = new DemoClass(1, 2); d3.Method(); // field: 1, Property: 2

var:

, :

, . , , . :

, , .. C. var. , void. , , .. , C. , C.

public, , PrinterDemoClass:

:

private (, , private), :

:

class DemoClass // … public void PublicMethod() Console.WriteLine($Public method); PrivateMethod(); // …

. static . , Console WriteWriteLine. , , PublicMethodPriter DemoClass. DemoClass:

class DemoClass // … public static void StaticMethod() Console.WriteLine(Message from static method); public void NoneStaticMethod() Console.WriteLine(Message from non static method); // …

DemoClass Main:

, , :

, . ( ), static :

var d9 = new DemoClass(); // private // Console.WriteLine($Get private field: d9.field); // Compile ERROR // d9.publicField = 123; Console.WriteLine($Get public field: d9.publicField); // Get public field: 123 // DemoClass.publicStaticField = 456; Console.WriteLine($Get public static field: DemoClass.publicStaticField); // Get public static field: 456

(, public) . – , gettersetter , .

Building height:

:

, C . .

gettersetter , . C . . , , , .

Building :

Height. get, , , set . , , , , get, .

:

, , – , , , getset, . Building , – :

Height.

this . . , Building, , height, SetHeight , , height:

– , height, height=height , , . , , , this, SetHeight:

. . , static, , . , . static, , :

;

( );

;

.

Math C.

github-.

email . *

, email .

. adhoc.插图