This project is read-only.

Convert.ToInt32();

Apr 9, 2012 at 9:30 AM
Edited Apr 9, 2012 at 9:33 AM

Hello this morning I had a big problem with the convertion from string to int
Here is my code:

if (com == "rfichier")

{ 

for (int i = 0; i < Filesystem.Vfs.HardDrive.Drive.GetDisk("C").GetFiles(); i++)

 

{

string data = Filesystem.Vfs.HardDrive.Drive.GetDisk("C").files[i].data;

 

Console.Write("L'id du fichier : " );   

var rf = Console .ReadLine();

Console.WriteLine(Filesystem.Vfs.HardDrive.Drive.GetDisk(

"C").files[Convert.ToInt32(rf)].data);

 

}}


 

 Thank you i use a google translator

 

 

else