Hi,
i tried to convert your code using this utility and it converts properly.
just give a try at
http://www.kamalpatel.net/ConvertCSharp2VB.aspx
Csharp Code.
==========
protected override AddInForm CreateAddInForm() {
String sDocumentName = base.Document.DocumentName;
String sDocumentPath = base.Document.DocumentPath;
ProjectItemStreamMode iMode = (ProjectItemStreamMode)0; //<==converter
chokes here
Stream sDocumentStream = base.Document.ProjectItem.GetStream(iMode);
return new MyFirstAddInForm(this, sDocumentPath, sDocumentName,
sDocumentStream);
}
Vb.Net Code.
==========
Protected Overrides Function CreateAddInForm() As AddInForm
Dim sDocumentName As String = MyBase.Document.DocumentName
Dim sDocumentPath As String = MyBase.Document.DocumentPath
Dim iMode As ProjectItemStreamMode = (ProjectItemStreamMode)0
'<==converter
chokes here
Dim sDocumentStream As Stream =
MyBase.Document.ProjectItem.GetStream(iMode)
Return New MyFirstAddInForm(this, sDocumentPath, sDocumentName,
sDocumentStream)
End Function
'----------------------------------------------------------------
' Converted from C# to VB .NET using CSharpToVBConverter(1.2).
' Developed by: Kamal Patel (
http://www.KamalPatel.net)
'----------------------------------------------------------------
HTH
Regards
Ashish M Bhonkiya
"TJS" <no****@here.com> wrote in message
news:uC*************@tk2msftngp13.phx.gbl...
I cannot seem to get this to convert to VB.
tried the converter at asp-alliance but it throws an error on line marked
any experts available ?
===== code ====
protected override AddInForm CreateAddInForm() {
String sDocumentName = base.Document.DocumentName;
String sDocumentPath = base.Document.DocumentPath;
ProjectItemStreamMode iMode = (ProjectItemStreamMode)0;
//<==converter chokes here
Stream sDocumentStream = base.Document.ProjectItem.GetStream(iMode);
return new MyFirstAddInForm(this, sDocumentPath, sDocumentName,
sDocumentStream);
}