110 likes | 255 Views
C #. Cody Driskill. Overview. Originally based on Java Premier language for working in windows environments. Datatypes. Strongly Typed Mixed datatype assignment Allows “null” values Unsafe keyword. Generics.
E N D
C# Cody Driskill
Overview • Originally based on Java • Premier language for working in windows environments
Datatypes • Strongly Typed • Mixed datatype assignment • Allows “null” values • Unsafe keyword
Generics • Public class GenericList<T>{void Add(T input) {}}class TestList{private class Example{}static void Main(){GenericList<int> l1 = new GenericList<int>();GenericList<string> l2 = new GenericList<string>();GenericList<Example> l3 = new GenericList<Example>();}
Scoping • Lexical scoping
Control Structures • for(int x = 5; x < 8; x +2) • foreach(int x in array) • while(Console.ReadLine()) • do{ something} while (Console.ReadLine()); • if (test) { do this } else { do this } • Switch (test){ case 1: do this; case 2: do this; default: do this;}
Concurrency • Threading • Actor Threads- No paramaters-manually started or aborted • Server Threads
Resources • msdn.microsoft.com!!!!