M
maxim
Hi,
I have a Class in C# that exposes property from System.Uri type.
I want to access this property from classic Visual Basic.
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.AutoDual)]
[Guid("C80CFADD-F676-4df6-8499-5C4F2E3434A5")]
public class TestClass
{
public TestClass()
{
}
public Uri MyUri
{
get
{
return new Uri("http://www.test.com");
}
}
}
Now I write in Visal Basic following code:
Dim oTestClass As New TestClass
If Not oTestClass.MyUri Is Nothing Then
'!!! I got "Type Mismatch" error here
'!!! I tried oTestClass.MyUri.ToString CStr(oTestClass.MyUri)
'!!! but result is that ToString is not exists and CStr also Type Mismatch
MsgBox oTestClass.MyUri
End If
Is there any way to do this?
Thanks,
Maxim.
I have a Class in C# that exposes property from System.Uri type.
I want to access this property from classic Visual Basic.
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.AutoDual)]
[Guid("C80CFADD-F676-4df6-8499-5C4F2E3434A5")]
public class TestClass
{
public TestClass()
{
}
public Uri MyUri
{
get
{
return new Uri("http://www.test.com");
}
}
}
Now I write in Visal Basic following code:
Dim oTestClass As New TestClass
If Not oTestClass.MyUri Is Nothing Then
'!!! I got "Type Mismatch" error here
'!!! I tried oTestClass.MyUri.ToString CStr(oTestClass.MyUri)
'!!! but result is that ToString is not exists and CStr also Type Mismatch
MsgBox oTestClass.MyUri
End If
Is there any way to do this?
Thanks,
Maxim.