PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Re: Creating structures to hold data
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Re: Creating structures to hold data
![]() |
Re: Creating structures to hold data |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
You can achieve the same thing with a class. Also, StringBuilder allows you
to define the size of the string. Try something this: public class RECORD { public StringBuilder Reference; public StringBuilder Description; public RECORD() { Reference = new StringBuilder(5); Description = new StringBuilder(50); } } HTH Neil -- Neil Cowburn OpenNETCF.org Advisor www.opennetcf.org "Martin Robins" <martin - robins @ ntlworld dot com> wrote in message news:uhDrecZRDHA.2228@tk2msftngp13.phx.gbl... > I am using C# on the compact fdramework and, having seen the performance of > SqlCe, have decided to work with flat data files rather than trying to use > SqlCe. > > Back in the days of BASIC, I was able to define a type and this could then > be used as my record format within a flat file. However, I have tried > creating a struct in C# and do not seem to be able to achieve the same. > > The MarshalAs atribute is not supported on the compact framework and as > such, I cannot specify specific data sizes for the values, string for > instance. > > Any suggestions? > > I am looking for something like the original BASIC > > Type RECORD > Reference as String * 5 > Description as String * 50 > End Type > > Cheers. > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

