Split (String)

string[] _Split = _DataRowView[2].ToString().Split((char)44); int _SplitCount = 1; foreach (string s in _Split) { if (s != "") { if (_SplitCount == 1) { _CursorX = System.Convert.ToInt32(s); } if (_SplitCount == 2) { _CursorY = System.Convert.ToInt32(s); } } _SplitCount += 1; } MSDN Artikel

Von |2015-06-15T21:56:39+00:00Juni 15th, 2015|Kommentare deaktiviert für Split (String)

HttpWebRequest

System.Net.HttpWebRequest _httpWebRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(_URL); // Proxy Credentials System.Net.WebProxy _WebProxy = new System.Net.WebProxy(); _WebProxy.Address = new Uri(_ProxyServer); _WebProxy.Credentials = new System.Net.NetworkCredential(_ProxyUsername, _ProxyPassword); _httpWebRequest.Proxy = _WebProxy; // Network Credentials _httpWebRequest.Credentials = new System.Net.NetworkCredential(_NetworkUsername, _NetworkPassword); _httpWebRequest.PreAuthenticate = true; _httpWebRequest.Timeout = System.Threading.Timeout.Infinite; System.Net.HttpWebResponse _httpWebReponse = null; try { _httpWebReponse = (System.Net.HttpWebResponse)_httpWebRequest.GetResponse(); } catch (System.Net.WebException ex) { } System.IO.StreamReader [...]

Von |2015-06-15T21:53:15+00:00Juni 15th, 2015|Kommentare deaktiviert für HttpWebRequest

Drive(s)

System.IO.DriveInfo[] _allDrives = System.IO.DriveInfo.GetDrives(); foreach (System.IO.DriveInfo _Drive in _allDrives) { System.Windows.Forms.MessageBox.Show(_Drive.TotalSize.ToString()); System.Windows.Forms.MessageBox.Show(_Drive.TotalFreeSpace.ToString()); }

Von |2015-06-15T21:42:22+00:00Juni 15th, 2015|Kommentare deaktiviert für Drive(s)

Events

public delegate void Finished_EventHandler(System.DateTime _FinishedDateTime, string _RunTime, string _ThreadID); public event Finished_EventHandler Finished; private input_DelegateVoid private_DelegateVoid; public void Start(input_DelegateVoid _DelegateVoid) { Run(); } private void Run() { if (Finished != null) { Finished(System.DateTime.Now, (System.DateTime.Now - _StartTime).ToString(), System.Threading.Thread.CurrentThread.ManagedThreadId.ToString()); } } MSDN Artikel

Von |2015-06-15T21:40:03+00:00Juni 15th, 2015|Kommentare deaktiviert für Events

Delegate

delegate void delegateUpdateProgress(int _ProgressValue); this.Invoke(new delegateUpdateProgress(this.UpdateProgress), new object[] { 'some value' }); private void UpdateProgress(int _ProgressValue) { this.UltraStatusBar.Panels["Progress"].Visible = true; this.UltraStatusBar.Panels["Progress"].ProgressBarInfo.Value = _ProgressValue; } MSDN Artikel

Von |2015-06-15T21:35:37+00:00Juni 15th, 2015|Kommentare deaktiviert für Delegate

Cursor (C#)

// wait System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; // reset System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;

Von |2015-06-15T21:28:57+00:00Juni 15th, 2015|Kommentare deaktiviert für Cursor (C#)

context connection (SQL CLR)

using (System.Data.SqlClient.SqlConnection _SQLConnection = new System.Data.SqlClient.SqlConnection("context connection=true")) { // SQL Connection öffnen _SQLConnection.Open(); } MSDN Artikel

Von |2015-06-15T21:25:22+00:00Juni 15th, 2015|Kommentare deaktiviert für context connection (SQL CLR)

Collection

public class XMLQueryCollectionItem { // Variables public string return_Query = ""; public string return_TableName = ""; // Constructor public XMLQueryCollectionItem(string _Query, string _TableName) { return_Query = _Query; return_TableName = _TableName; } } public class XMLQueryCollection : System.Collections.CollectionBase { public void Add(XMLQueryCollectionItem _Item) { this.List.Add(_Item); } public void Add(string _Query, string _TableName) { this.List.Add(new XMLQueryCollectionItem(_Query, [...]

Von |2015-06-15T21:22:06+00:00Juni 15th, 2015|Kommentare deaktiviert für Collection

AppDomain

System.AppDomain _AppDomain = System.AppDomain.CreateDomain("AppDomainName"); _AppDomain.DoCallBack(new System.CrossAppDomainDelegate(SomeMethod)); MSDN Artikel

Von |2015-06-15T21:14:27+00:00Juni 15th, 2015|Kommentare deaktiviert für AppDomain

TextReader

string _FileText; using (System.IO.TextReader _TextReader = new System.IO.File.OpenText("PathFile")) { _FileText = _TextReader.ReadToEnd(); } MSDN Artikel

Von |2015-06-15T21:09:46+00:00Juni 15th, 2015|Kommentare deaktiviert für TextReader