C
Chris Oswald
I am trying to pass a generic collection as a parameter to a method and
I keep getting a compile error. I can do this in the full framework
but not CF. Can anyone explain to me why this doesn't work? I get the
following error: genasm.exe(1) : error There was an error finalizing
type . Type 'DTC.NAFOP.Mobile.DockClient.Driver,
DTC.NAFOP.Mobile.DockClient, Version=1.0.1.13528, Culture=neutral,
PublicKeyToken=null' was loaded in the ReflectionOnly context but the
AssemblyBuilder was not created as
AssemblyBuilderAccess.ReflectionOnly.
I have attached a code sample below
Public Class Driver()
Sub New()
' Default Ctor
End Sub
private _firstName as string
Public Property FirstName() As String
Get
Return _firstName
End Get
Set(ByVal value As String)
_firstName = value
End Set
End Property
End Class
Public Class Geofence
Sub New()
' Default Ctor
End Sub
Public Sub FenceDrivers(ByVal drivers As
System.Collections.ObjectModel.Collection(Of Driver))
' Fence Drivers
End Sub
End Class
I keep getting a compile error. I can do this in the full framework
but not CF. Can anyone explain to me why this doesn't work? I get the
following error: genasm.exe(1) : error There was an error finalizing
type . Type 'DTC.NAFOP.Mobile.DockClient.Driver,
DTC.NAFOP.Mobile.DockClient, Version=1.0.1.13528, Culture=neutral,
PublicKeyToken=null' was loaded in the ReflectionOnly context but the
AssemblyBuilder was not created as
AssemblyBuilderAccess.ReflectionOnly.
I have attached a code sample below
Public Class Driver()
Sub New()
' Default Ctor
End Sub
private _firstName as string
Public Property FirstName() As String
Get
Return _firstName
End Get
Set(ByVal value As String)
_firstName = value
End Set
End Property
End Class
Public Class Geofence
Sub New()
' Default Ctor
End Sub
Public Sub FenceDrivers(ByVal drivers As
System.Collections.ObjectModel.Collection(Of Driver))
' Fence Drivers
End Sub
End Class