使用现有的字体类型就可以了,比 如:
this.Font = new Font(this.Font. FontFamily, this.Font.Size, this.Font.Style | FontStyle.Bold) ;...
User Profile
Collapse
-
such as:
string queryString = "SELECT Count(1) AS IDExists FROM tblCustomer HERE ID=?";
OleDbCommand command = new OleDbCommand(qu eryString, connection);
command.Paramet ers.Add("@p1", OleDbType.Char, 3).Value = "a";
object retValue= command.Execute Scalar();
if (retValue is int && (int)retValue>0 )
{
//exists records
}
else
{...Leave a comment:
-
using (ManagementEven tWatcher w = new ManagementEvent Watcher(scope,q ))
{
....
}
w is disposed!
make it global!
for example:
private ManagementEvent Watcher w;
...
w=w ManagementEvent Watcher(scope,q );
w....Leave a comment:
-
example:
public static void AddEmployee(
string lastName,
string firstName,
string title,
DateTime hireDate,
int reportsTo,
string photoFilePath,
string connectionStrin g)
{
byte[] photo = GetPhoto(photoF ilePath);
using (SqlConnection connection = new SqlConnection(
connectionStrin g))
SqlCommand command =...Leave a comment:
-
int xvar=0;
int yvar=0;
int retvar=0;
retvar = addparams(out xvar,out yvar);
Console.WriteLi ne(xvar);
Console.WriteLi ne(yvar);
Console.WriteLi ne(retvar);Leave a comment:
-
return struct or class.
example:
struct A
{
public int a;
public int b;
public int c;
}
public A addparams(out int x,out int y)
{
Int someinteger;
//code
A a=new A();
a.a=1;
a.b=2;
a.c=3;
return a;
}...Leave a comment:
-
-
like this:
TextBox tb;
tb.DataBindings .Add("Text", ds, "fieldname" );Leave a comment:
-
-
Color color = Color.FromArgb( int.Parse("D57B F2", System.Globaliz ation.NumberSty les.HexNumber)) ;
Console.WriteLi ne(color);
----------------------------------------
out put:
Color [A=0, R=213, G=123, B=242]Leave a comment:
No activity results to display
Show More
Leave a comment: