Converting VB.Net code to C#
I'm having a problem converting some VB.Net code to C#. I'm using some COM
objects (DLLS) that I have modified to return XML. I'm trying to interface
with two properties of the COM object and then execute a Method that will
use XML data from the properties. The method does what it needs to due and
updates another property of the COM object and then returns a boolean value
indicating if it was successfuly.
So, I have two properties and a single method. The method is a Request and
the two properties are the incoming XML request document and the returning
XML response document.
The reason I have to use properties and not simply send/recieve the XML as
input and response parms of the Method, is because the COM object is not
handling larger XML strings well. Because of this, I have only two options.
I can pass in an XML DOM object or I can simply send in a string of xml
data. If send in a string, the COM object has to take the large string and
load it into an XML Document. I have been able to get around this by creating
the properties as DOM Documents (version 4.0) and simply loading and reading
the properties directy within my VB.Net application.
My problem is that I am not able to do the same thing via C#, or at least
I do not see know to do this.
I have copied a sample button click event to show you how this is working
in my VB.Net app. I have referenced the COM object (DLL) as MbrInquiry_RequestHandler.Request.
If anyone has any ideas how I can get this to work in C#, please let me know.
I can get it to work if I pass strings, but I do not want this overhead.
I would rather load the DOM properties from my C# app and then execute the
Any help would be very much appreciated.
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim objReq As New RequestHandler.RequestClass
Dim str As String = objReq.xmlRequestDoc.xml
If objReq.Request Then
str = objReq.xmlResponseDoc.xml
str = "Error"
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL