RcBuilder@walla.com
call centre: 054-5614020

Custom Config Section

Posted by: RcBuilder  /   Category: configuration / Custom section / SOURCE CODE / StringBuilder   /   No Comments
09
Nov
2014

Custom Config Section web.config <configuration> <configSections> <section name="MySectionConfig" type="MySectionClass" /> </configSections> <MySectionConfig> <E1>ELEMENT 1</E1> <E2>ELEMENT 2</E2> <E3 A1="ATTRIBUTE 1" A2="ATTRIBUTE 2" A3="ATTRIBUTE 3" /> <G1> <add name="Name1" value="Value1" /> <add name="Name2" value="Value2" /> <add name="Name3" value="Value3" /> </G1> </MySectionConfig> </configuration> MySectionClass using System; using System.Configuration; using System.Text; public class MySectionClass : ConfigurationSection { public E e1 { get { return (E)this; } } public E e2 { get { return (E)this; } } public E3 e3 { get { return.

Read more

MD5Encoding class

Posted by: RcBuilder  /   Category: MD5Encoding / Security / SOURCE CODE / StringBuilder   /   No Comments
28
Sep
2014

MD5Encoding class using System.Text; using System.Security.Cryptography; public class Security { public class MD5Encoding { private string GetMd5Hash(MD5 md5Hash, string input) { // Convert the input string to a byte array and compute the hash. byte.ToString("x2")); // x2 = hexadecimal format return sb.ToString(); } private bool VerifyMd5Hash(MD5 md5Hash, string input, string hash) { string InputHash = GetMd5Hash(md5Hash, input); StringComparer comparer = StringComparer.OrdinalIgnoreCase; return comparer.Compare(InputHash, hash) == 0; } public string Encode(string input) { using (MD5 md5Hash =.

Read more

winforms – export gridview to csv or excel

Posted by: RcBuilder  /   Category: CSV / Excel / File / Files / folderBrowserDialog / MessageBox / SOURCE CODE / StringBuilder / winForms   /   No Comments
08
Sep
2014

winforms - export gridview to csv or excel string xls_file_name = .... var result = folderBrowserDialog1.ShowDialog(); if (result != DialogResult.OK) return; string xls_file_path = string.Concat(folderBrowserDialog1.SelectedPath, "\\", xls_file_name); StringBuilder sb = new StringBuilder(); // HEADER ROW // foreach (DataGridViewColumn col in dg1.Columns) sb.AppendFormat("\"{0}\"{1}", col.Name, col.Index == dg1.Columns.Count ? string.Empty : ","); sb.Append(Environment.NewLine); // CONTENT // foreach (DataGridViewRow row in dg1.Rows) { foreach (DataGridViewColumn col in dg1.Columns) sb.AppendFormat("\"{0}\"{1}", dg1.Value, col.Index ==.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים