translate C# to VB

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
C

Craig Buchanan

if i have a class that is declared

public abstract class Hashlist : IDictionary, IEnumerable
{
....}

how do i translate the following (method?) into vb?

IEnumerator IEnumerable.GetEnumerator()
{
return m_oValues.GetEnumerator();
}

thanks,

Craig Buchanan
 
Craig Buchanan said:
if i have a class that is declared

public abstract class Hashlist : IDictionary, IEnumerable
{
...}

how do i translate the following (method?) into vb?

IEnumerator IEnumerable.GetEnumerator()
{
return m_oValues.GetEnumerator();
}

public function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator

return m_ovalues.getenumerator
end function
 
Try the following to convert the class:

----------------------------------
Public MustInherit Class HashList
Implements IDictionary, IEnumerable


' ..... Rest of methods


' GetEnumerator method
Public Function GetEnumerator() as IEnumerator implements
IEnumerable.GetEnumerator
return m_oValues.GetEnumerator()
End Function

End Class

----------------------------------

There are several automatic C# to VB converters available to do the job
automatically. I recently formatted my machine, so have no links, but have a
search on http://groups.google.com for C# to VB

HTH,

Trev.
 
* "Craig Buchanan said:
if i have a class that is declared

public abstract class Hashlist : IDictionary, IEnumerable
{
...}

how do i translate the following (method?) into vb?

IEnumerator IEnumerable.GetEnumerator()
{
return m_oValues.GetEnumerator();
}

In addition to the other replies:

C# -> VB.NET Converters:

<http://www.kamalpatel.net/ConvertCSharp2VB.aspx>
<http://csharpconverter.claritycon.com/Default.aspx>
<http://www.ragingsmurf.com/vbcsharpconverter.aspx>
<http://www.gotdotnet.com/Community/...mpleGuid=c622348b-18a9-47d6-8687-979975d5957d>

<http://www.remotesoft.com/>
-> "Octopus"
 
Back
Top