K
Kim Würtz
Hi All
I have noticed what appears to be a bug during migration of a C# project
from .NET 1.0 to .NET 2.0.
I have an application running on a Windows Mobile 2003 SE developed with VS
2003 using .NET CF 1.0 with no problems what so ever.
However recently I had to upgrade to VS 2005 and during the first load of
the C# project I was asked to upgrade the project to .NET CF 2.0, hich I
accepted. I was able to recompile the project in VS 2005 with no errors.
HOWEVER when I deployed and ran the application I consistently got an
exception:
NotSupportedException
No difference if I run it on a real device or on the emulator.
A snippet of the code (simplified for clarity) goes like this:
private void SomeWork()
{
TEST info;
info = new TEST(Marshal.SizeOf(typeof(TEST))); ********* The
NotSupportedException is thrown here
}
public class TEST : Struct
{
public int some_data;
public TEST(int size) : base(size)
{
}
}
public class Struct
{
byte[] i_data;
public Struct(int size)
{
i_data = new byte[size];
}
}
What am I missing ??
Best regrads and thanks in advance
Kim Würtz
I have noticed what appears to be a bug during migration of a C# project
from .NET 1.0 to .NET 2.0.
I have an application running on a Windows Mobile 2003 SE developed with VS
2003 using .NET CF 1.0 with no problems what so ever.
However recently I had to upgrade to VS 2005 and during the first load of
the C# project I was asked to upgrade the project to .NET CF 2.0, hich I
accepted. I was able to recompile the project in VS 2005 with no errors.
HOWEVER when I deployed and ran the application I consistently got an
exception:
NotSupportedException
No difference if I run it on a real device or on the emulator.
A snippet of the code (simplified for clarity) goes like this:
private void SomeWork()
{
TEST info;
info = new TEST(Marshal.SizeOf(typeof(TEST))); ********* The
NotSupportedException is thrown here
}
public class TEST : Struct
{
public int some_data;
public TEST(int size) : base(size)
{
}
}
public class Struct
{
byte[] i_data;
public Struct(int size)
{
i_data = new byte[size];
}
}
What am I missing ??
Best regrads and thanks in advance
Kim Würtz