TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
tomy batistakis
NA
1
0
Reading numbers from a file
Jul 26 2010 5:18 AM
Dear all
I want to read a file ("test.txt") tha contains the following line and put the numbers in an array
" A 1.3 1.2 2.5 B"
As you can see the spaces between the characters are random
I know that it is extremely is to be done in C with the following way
float A[3];
char x1,x2;
fp1=fopen("test.txt","r");
fscanf(fp1,"%c %f %f %f %c \n",&x1,&A[0],&A[1],&A[2],&x2);
fclose(fp1);
Can someone tell me how can I do it in C#?
Thanks in advance
Chrysostomos
Reply
Answers (
1
)
Loading silver light App fastly
create dynamic control using c# in asp