C#中不能用null替代的Nothing,用什么替代?-----------(在线等)
通常情况下,VB中的Nothing都可能用null替代,但是以下程序却不能。
try
{
ADODB.RecordsetClass rs = new ADODB.RecordsetClass();
rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
rs.Open
("d:\\a",
null,
ADODB.CursorTypeEnum.adOpenStatic,
ADODB.LockTypeEnum.adLockReadOnly,
1);
MessageBox.Show(rs.RecordCount.ToString());
}
catch()
{}
这段代码在VB中将null换在Nothing就可以通过,但在C#中用什么才能代替这个null呢?
(注:d:\a是我用VB.adodb.recordset.save的一个文件)
Please help me!