C#转VB
public static implicit operator string[](StringList sl)
{
string[] sLHS = new string[sl.m_alMain.Count];
int index = 0;
while(index < sl.m_alMain.Count)
{
sLHS[index] = (string)sl.m_alMain[index];
index++;
}
return sLHS;
}
原代码如上,这是一个函数来是什么,如果是函数,函数名是什么,我用网上工具转成如下,不对、
Public Shared Widening Operator CType(ByVal sl As StringList) As String()
Dim sLHS As String() = New String(sl.m_alMain.Count - 1) {}
Dim index As Integer = 0
While index < sl.m_alMain.Count
sLHS(index) = DirectCast(sl.m_alMain(index), String)
index += 1
End While
Return sLHS
End Operator