随笔分类 - c#
GetWindowThreadProcessId用法(转)
摘要:函数功能:该函数返回创建指定窗口线程的标识和创建窗口的进程的标识符,后一项是可选的。函数原型;DWORD GetWindowThreadProcessld(HWND hwnd,LPDWORD lpdwProcessld);参数:hWnd:窗口句柄。lpdwProcessld:接收进程标识的32位值的地址。如果这个参数不为NULL,GetWindwThreadProcessld将进程标识拷贝到这个32位值中,否则不拷贝。返回值:返回值为创建窗口的线程标识。C#中使用该函数首先导入命名空间:using System.Runtime.InteropServices; 然后写API引用部分的代码...
阅读全文
对'c:\inetpub\wwwroot\XXXXX\'的访问被拒绝。未能开始监视文件更改。”
摘要:在XXXX上点击右键,点击“共享和安全”,点击“安全”标签,添加用户,在弹出窗口中点击高级,点击立即查找,找到“EVERYONE”确定,添加。
阅读全文
Comparing Properties to Methods
摘要:Similarities1.Both contain code to be executed2. Both can be used to hide implementation details3. Both can be virtual, abstract, or override Differences1. Syntactic – properties do not use parenthese...
阅读全文
Operator And Methods
摘要:using Methods 1.Reduce clarity 2.Increase risk of errors,both syntactic and semanticuisng Operator makes expression cleatExample: MyIntVar1=MyIntVar2+MyIntVar3 (Operator)...
阅读全文
Struct Constructor Restrictions
摘要:Struct Constructor RestrictionsAlthough the syntax for struct and class constructors is the same, there are someadditional restrictions that apply to struct constructors:1. The compiler always create...
阅读全文
权限设计(转)
摘要:在任何系统中,权限设计是最基础的东西,本文给出一个基于角色的权限设计的循序渐进的设计方案。 在权限系统中,功能(权限)是最小的单位,比如起草新闻、编辑新闻、审核新闻、删除新闻等,而角色是一类功能的集合,比如新闻编辑这个角色,他可能有起草新闻、编辑新闻等功能集合,而责任编辑他可能就有更多的权限,比如除了新闻编辑的功能,还有审核新闻、删除新闻等功能,给张三赋予新闻编辑的角色(其实我更愿意说把张三...
阅读全文
concept--------polymorphism
摘要:Polymorphism literally means many forms or many shapes. It is the concept thata method declared in a base class can be implemented in many different ways inthe different derived classes.
阅读全文
1
摘要:There are five different kinds of types in C#:classstructinterfaceenumdelegate You can nest all five of these inside a class or a struct. Note You cannot nest a type inside an interface, an enum, ...
阅读全文
收集的学习资料
摘要:http://www.blogcn.com/User8/flier_lu/blog/4371854.html http://blog.joycode.com/liuhuimiao/articles/30654.aspx
阅读全文
.NET程序员面试的题一部 (转)
摘要:1. new 关键字用法 (1)new 运算符 用于创建对象和调用构造函数。 (2)new 修饰符 用于向基类成员隐藏继承成员。 (3)new 约束 用于在泛型声明中约束可能用作类型参数的参数的类型。 2.如何把一个Array复制到ArrayList里 (1) 实现1 string[] s ={ "111", "22222" }; ArrayList list = new ArrayList...
阅读全文
datagrid资料(转)
摘要:关于datagrid的打印http://www.chinaaspx.com/article/csharp/295.htmC#中为DataGrid添加下拉列表框http://www.cnblogs.com/icesnaker/archive/2004/09/21/45015.aspxDataGrid也玩分页http://dev.csdn.net/article/32/32339.shtmDataGr...
阅读全文
关于DataAdapter打开和关闭连接
摘要:今天看书的时候,终于看明白了DataAdapter相关的打开和关闭连接的问题DataAdapter使用的时候可以不显示的打开或关闭连接,这是因为DataAdapter能够自动的处理该任务.如果在调用Fill方法的时候连接是关闭的,则连接会自动打开,然后从数据库中把数据记录填充到DataSet中,接着连接会自动关闭.如果调用Fill方法的时候连接已经打开,DataAdapter对象将保持打开连接,直...
阅读全文
访问数据选用DataReader还是DataSet?
摘要:从复杂性来看,DataSet需要的系统开销显然要比DataReader多,在性能和内存的使用上就 会有负面影响.因此都应该优先考虑使用DataReader对象而不是DataSet,仅在下列情况下使用DataSet对象.1.当需要远程控制数据,即与数据存储断开连接,并需要将数据传递到应用程序的另一层或客户端应用程序,存储这些数据以便在过程中或类似的场景中使用\编辑他们2.当需要存储\传输或访问多个表...
阅读全文
获取远程主机的MAC(转贴)
摘要:using System.Runtime.InteropServices; [DllImport("Iphlpapi.dll")] private static extern int SendARP(Int32 dest,Int32 host,ref Int64 mac,ref Int32 length); [DllImport("Ws2_32.dll")] private st...
阅读全文
浙公网安备 33010602011771号