.net怎么办怎么办

     如果想得到sql的受影响行集(前提是你没定set nocount on,而且不是select语句,只是想知道insert/update/delete成没成功),你可以使用SqlReader的RecordsAffected属性,如果你用的是SqlCommand的ExecuteNonQuery(),没用到SqlReader,该方法会返回一个整数值,代表受影响的行集,如果没有的话记住是-1而不是0

   

     MultiExtended和multisimple的区别:一般选MultiExtended,按住鼠标拖就成了,multisimple不能拖,只能一个一个点

    

     静态类不允许继承自其他类(只能继承object类)~

  • The class may not derive from anything other than System.Object, and if you don’t specify any base type, then derivation from System.Object is implied.
  • The class may not be used as a base class of another class.
  • The class can only contain static members, which can be public or private. However, they cannot be marked protected or protected internal, since the class cannot be used as a base class.
  • The class may not have any operators, since defining them would make no sense if you cannot create instances of the class.

    null 的区别String.Empty:

       Null means the variable has no reference set
       String.Empty means the variable references a string with no characters, eg ""      
         To be sure use String.IsNullOrEmpty ( http://msdn.microsoft.com/en-us/library/system.string.isnullorempty(VS.80).aspx).
      你想改变Dictionary<>的key值 ?没有直接的方法,只能删了再添~
       数组序列化为XML格式

MemoryStream memoryStream = new MemoryStream();

            XmlSerializer xs = new XmlSerializer(typeof(int[]));

            XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);

            xs.Serialize(xmlTextWriter, list);

            memoryStream = (MemoryStream)xmlTextWriter.BaseStream;

 

            UTF8Encoding encoding = new UTF8Encoding();          

            String constructedString = encoding.GetString(memoryStream.ToArray());

    

     C# 构造函数调用构造函数

     class myClass
{
     pulbic myClass()
      
{
      }


     
public myClass(string s) this()
      
{

      }

}
 

   

     给按钮添加快捷键:&名就可以了,比如button1.text= "确定(&O)"。此时按alt、control、shift+O都会触发按键事件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值