Hi,
first statment (s) e.g.
Imports System.io
Public Class Form1
Inherits System.Windows.Forms.Form
..........
Pete
--
Pete Vickers
Microsoft .NET Compact Framework MVP
HP Business Partner
http://www.gui-innovations.com
I am still having problems with this, it seems that my problem may be
due
to
the fact that I do not have the system.io reference, I have no idea why
that
might be - when I right click references in the solutions explorer and
select
add, system.io is not in the list. Can I add imports system.io into my
code
and if so where should I put it - I have tried but get either syntax
error
or
'imports' statement must precede and declarations (I've tried pasting
it
loads of places.
Thanks in advance - - - if anyone can help.
Roger.
:
Thanks to all, especially you Pete, the article is exactly what I have
been
looking for, I remember your name from eVB forum - you helped me out a
lot
then as well - thanks very much.
Roger.
:
Hi,
take a look at the white paper on migrating eVB file access to
VB.Net -
it
could be just what you are looking for
http://msdn.microsoft.com/mobility/...n-us/dnppcgen/html/migrating_evb_controls.asp
Pete
--
Pete Vickers
Microsoft .NET Compact Framework MVP
HP Business Partner
http://www.gui-innovations.com
Hi Darren,
I have just changed over from eVB to .net (I could open and read
txt
files
in eVB no problem). I am using VS.net 2003 to build a smart device
app in
VB,
I have the app running on my pocket pc but just need to access the
text
file
and read it in to finish the app.
Roger.
:
Are you sure you're building a Smart Device application using
VB.Net?
The fact that you don't see System.IO tells me you're probably
not.
This is the compactframework newsgroup. If you're using eVB, you
may want to post in microsoft.public.pocketpc.developer
-Darren
Thanks for the code Darren but that does not work either, I am
using VB
(forgot to say before). I am also a little puzzled where I can
use
system.IO,
I have tried to add the reference but it does not exist in the
available
list
of references.
Roger.
:
Roger,
Here's a sample for you of processing a text file line by line
with
comma-separated values:
using System.IO;
/////
try
{
FileInfo f = new FileInfo(fileName);
using ( StreamReader sr = f.OpenText() )
{
String line;
while ( ( line = sr.ReadLine() ) != null )
{
string[] values = line.Split(',');
foreach(string s in values)
{
// do something with the data
}
}
}
}
catch ....
-Darren Shafer
Hi All,
I would like to open a text file and read in the contects
line
by
line,
I
have tried using the following line like I have used in the
regular
.net
before but it doesn't work in pocket pc .net (to read the
text
I
would
normally use lineinput):
FileOpen(1, "Textfile.txt", OpenMode.Input)
Thanks in advance,
Roger.