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

By |2015-06-15T21:56:59+02:00June 15th, 2015|0 Comments

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 [...]

By |2015-06-15T21:53:38+02:00June 15th, 2015|0 Comments

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()); }

By |2015-06-15T21:51:29+02:00June 15th, 2015|0 Comments

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

By |2015-06-15T21:40:26+02:00June 15th, 2015|0 Comments

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

By |2015-06-15T21:36:01+02:00June 15th, 2015|0 Comments

Cursor (C#)

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

By |2015-06-15T21:29:18+02:00June 15th, 2015|0 Comments

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

By |2015-06-15T21:25:48+02:00June 15th, 2015|0 Comments

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, [...]

By |2015-06-15T21:22:28+02:00June 15th, 2015|0 Comments

AppDomain

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

By |2015-06-15T21:14:53+02:00June 15th, 2015|0 Comments

TextReader

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

By |2015-06-15T21:11:31+02:00June 15th, 2015|0 Comments
Go to Top