C#关键字:访问关键字(access keyword)
C#中访问关键字(access keyword)有两个:base、this
1.base
用于从派生类中访问基类的成员,包括:
a.调用基类上已被其它方法重写(override)的方法。
b.指定创建派生类实例时应调用的基类构造函数。
注意:对基类的访问只能在构造函数、实例方法或实例属性访问器中进行。
从静态方法中使用base关键字是错误的。
2.this
引用当前对象(为该对象调用了方法),this关键字可用于从构造函数、实例方法和实力访问器中访问成员。
this的一般用途:
a.限定被相似的名称隐藏的成员。
b.将对象作为参数传递到其它方法。
c.声明索引器。
相关文档:
文章来源: http://www.zoesan.com By Error 302777528转载请注明出处
以上vb用到指针技术查找字符串与c#一般的.indexof()查找相比较,明显看出谁快谁慢。
VB:
Option Explicit
'指针方法操作字符串
'Copy一个字符串到缓存中
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public ......
ASP.NET如何连接Access或SQL Server数据库
首先看一个例子代码片断:
程序代码:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+ ......
在 .NET 里面使用 SQLite, 我这里使用的wrapper是 System.Data.SQLite,它只需要一个dll,接口符合ADO.Net 2.0的定义,性能也不错,NHibernate用的也是它,目前支持ADO.NET 3.5了,支持集成在 VS2005 和 VS2008里面,而且支持wince,是个亮点
因为符合ADO.NET的规范,所以使用方式,基本和 SqlClient, OleDb等原生的一致
us ......
Introduction
This article is about passing data between VB.NET/C# WinForms and JavaScript.
Before reading further, let me warn you that this article is not about ASP.NET. Concepts covered in the article are applied to Desktop applications.
Background
I was working on a project which required dat ......
1 类似xmlns=""的文件
示例XML文件:
<?xml version="1.0" encoding="UTF-8"?>
<WebSrvMessage xmlns="http://www.lenoval.com/">
<version>1.0</version>
<DataContent>
<DateTag>2010-5-17</DateTag>
</DataCont ......