我正在将VB.Net程序转换为C#.编写VB.Net代码的程序员离开了,所以我不能向他求助,而我对VB.net知之甚少.在他的计划中,他有以下内容:
public DataSet getData(string SQL)
{
'Some variable declarations
Dim ds As New DataSet
Try
'Some code
getData = ds 'This is the part of the code I am having trouble figuring out.
'some more code
}
Run Code Online (Sandbox Code Playgroud)
所以getData是函数的名称,他将自己设置为"ds".所以我的问题是,为什么你会将函数设置为内在的东西?什么是"getData = ds"的正确C#版本?
| 归档时间: |
|
| 查看次数: |
141 次 |
| 最近记录: |