S
Steve Graddy
I am trying to convert the following VB.Net code to C# and I am getting the
compiler error:
VB.NET code:
'' Create a delegate that will be called asynchronously
Private Delegate Function GetTextData(ByVal DatabaseName As String, _ByVal
ProcName As String)
Dim async As New GetTextData(AddressOf TextProxy)
Dim asyncResult As IAsyncResult
My C# Conversion Code:
// Create a delegate that will be called asynchronously
private delegate void GetTextData(string DatabaseName, string ProcName);
GetTextData async = new GetTextData(TextProxy); <-- Causes a compiler error
IAsyncResult asyncResult;
I am receiveing a compiler error of:
A field initializer cannot reference the nonstatic field, method, or
property ''Orgbrat.DataUtility.DBSchema.TextProxy(string, string)''
Can any of you other guys help me with this conversion. You help is much
appreciated. Thanks...
Steve Graddy
(e-mail address removed)
compiler error:
VB.NET code:
'' Create a delegate that will be called asynchronously
Private Delegate Function GetTextData(ByVal DatabaseName As String, _ByVal
ProcName As String)
Dim async As New GetTextData(AddressOf TextProxy)
Dim asyncResult As IAsyncResult
My C# Conversion Code:
// Create a delegate that will be called asynchronously
private delegate void GetTextData(string DatabaseName, string ProcName);
GetTextData async = new GetTextData(TextProxy); <-- Causes a compiler error
IAsyncResult asyncResult;
I am receiveing a compiler error of:
A field initializer cannot reference the nonstatic field, method, or
property ''Orgbrat.DataUtility.DBSchema.TextProxy(string, string)''
Can any of you other guys help me with this conversion. You help is much
appreciated. Thanks...
Steve Graddy
(e-mail address removed)