- database
using System.Data.Odbc;
var odbc = new OdbcConnection(sConnStr);
odbc.Open();
var cmd = odbc.CreateCommand();
cmd.CommandText = sSql;
var reader = cmd.ExecuteReader();
while (reader.Read()) {
for (int i = 0; i < reader.FieldCount; i++) {
if (reader.IsDBNull(i)) continue;
sh.Cells(y, i+1).Formula = reader.GetValue(i).ToString();
}
System.Console.WriteLine(reader.GetString(0));
}
- debugging
System.Windows.Forms.MessageBox.Show("hello");
System.Console.WriteLine("test");
- misc
System.Reflection.Assembly.GetExecutingAssembly()
if (typeof(WypElementUmowa).IsInstanceOfType(w))
o.GetType().Name/FullName //System.Type
System.Threading.Thread.Sleep(2000)
- regex
s = System.Text.RegularExpressions.Regex.Replace(s, " .*$", "");
- tools
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ildasm.exe" sth.dll
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\resgen.E
XE"
D:\Program_Files\ilspy\ILSpy.exe - interactive, decompiles nice code