Florian Rappl, Department of Theoretical Physics, University of Regensburg
System.IO
namespacePath
Directory
and File
DirectoryInfo
, FileInfo
DriveInfo
Stream
FileStream
existsvar fs = new FileStream("...", FileMode.Open)
will give us the streamReadByte()
Read()
will read as many bytes as specified into an arrayFileMode.Create
WriteByte()
and Write()
Close()
Flush()
methodReadAsync()
and WriteAsync()
StreamReader
, StreamWriter
TextReader
, TextWriter
Stream
(or create a FileStream
)var sw = new StreamWriter("...", false, Encoding.ASCII)
WriteLine()
WebRequest.Create()
creates a new web requestvar request = WebRequest.Create(url);
var response = await request.GetResponseAsync();
var stream = new StreamReader(response.GetResponseStream());
var content = stream.ReadToEnd();
event
keyword+=
, -=
operations (outside)public event EventHandler MyEvent
to registerEventHandler
object
, EventArgs
(or derived)void
null
(check first!)BitConverter
is a very useful class[Serializable]
is importantXmlSerializer
classSerialize()
Deserialize()
methodDynamicObject
typedynamic a = 4
var
can be object
or dynamic
var
is no type, but a placeholderobject
is the most general type; everything is an objectdynamic
is no type, but a switchFlorian Rappl, MVP Visual C#