How do I make a File of Record?

  • Thread starter Thread starter MyName
  • Start date Start date
M

MyName

Here's a Delphi example....

type UserStats = Record
bestcompleted := int;
bestAverage := real;
BestPercentage := string;
end;

var
stats : file of UserStats;

How Do I do the above in VB .Net?
How would I Read from, and write to the file?
 
* MyName said:
type UserStats = Record
bestcompleted := int;
bestAverage := real;
BestPercentage := string;
end;

var
stats : file of UserStats;

How Do I do the above in VB .Net?
How would I Read from, and write to the file?

Define a structure ('Structure') and use 'FileGet' and 'FilePut' to
read/write the file.
 
Public Structure UserStats

Public bestcompleted As Integer

Public bestAverage As Double ' Don't know what a real is

Public BestPercentage As String

End Structure



Dim MyUserStats As UserStats

MyUserStats.bestcompleted = 10
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top