-
Miscillaneous Operatorsc# 2016. 7. 8. 21:13
Operator Description Example sizeof() Returns the size of a data type. sizeof(int), returns 4. typeof() Returns the type of a class. typeof(StreamReader); & Returns the address of an variable. &a; returns actual address of the variable. * Pointer to a variable. *a; creates pointer named 'a' to a variable. ? : Conditional Expression If Condition is true ? Then value X : Otherwise value Y is Determines whether an object is of a certain type. If( Ford is Car) // checks if Ford is an object of the Car class. as Cast without raising an exception if the cast fails. Object obj = new StringReader("Hello"); StringReader r = obj as StringReader;
'c#' 카테고리의 다른 글
페이스북에 글 등록하기 (0) 2016.07.11 foreach 문 array문 (0) 2016.07.08 오라클 연동 (0) 2016.06.29 c# day2 (0) 2016.06.28 c#_Visual Studio2015-Day1 (0) 2016.06.27