收获001
1.vs 代码试图,右键菜单:
a.提取方法,b.重命名变量
c.插入代码段:预先编写好的代码块,
例如:#region ......#endregion
2.
private void DoInsertUpdate(SqlCommand cm)
{
cm.CommandType = CommandType.StoredProcedure;
cm.Parameters.AddWithValue("@tenantID", tenantID);
cm.Parameters.AddWithValue("@isStatic", isStatic);
cm.Parameters.AddWithValue("@objectRelationGuid", objectRelationGuid);
cm.Parameters.AddWithValue("@toObjectGuidString", toObjectGuidString);
cm.Parameters.AddWithValue("@objectGuid", objectGuid);
cm.Parameters.AddWithValue("@parentGuid", parentGuid);
cm.Parameters.AddWithValue("@id", id);
cm.Parameters.AddWithValue("@internalID", internalID);
cm.Parameters.AddWithValue("@name", name);
cm.Parameters.AddWithValue("@lastChangedUser", lastChangedUser);
cm.Parameters.AddWithValue("@lastChangedTime", lastChangedTime);
SqlParameter paramstamp = new SqlParameter("@newlastChangedTimestamp", SqlDbType.Timestamp);
paramstamp.Direction = ParameterDirection.Output;
cm.Parameters.Add(paramstamp);
cm.ExecuteNonQuery();
lastChangedTimestamp = (byte[])cm.Parameters["@newlastChangedTimestamp"].Value;
}
3.SELECT * FROM sys.table_types
4.
delegate 委托,定义签名
event 事件
委托实例封装方法,然后,连接到事件
最后,被执行的是方法.----由事件触发.
思想:将方法作为参数进行传递
5.Context
一些上下文信息,用户的,系统的.....
Variable
全局变量,页面之间的
internal static class Variable
{
private static bool _namespaceFlag = false;
public static bool NamespaceFlag
{
get { return _namespaceFlag; }
set { _namespaceFlag = value; }
}
private static Guid _objectGuid = Guid.Empty;
public static Guid ObjectGuid
{
get { return _objectGuid; }
set { _objectGuid = value; }
}
}

浙公网安备 33010602011771号