Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public static void AddFile(string File)
  2. {
  3. Globals.File file = new Globals.File();
  4.  
  5. string texto = File.Split(' ')[0];
  6.  
  7. int valorPos = texto.IndexOf(@"""") + 1;
  8. string valorEntreAspas = texto.Substring(valorPos, texto.IndexOf(@"""", valorPos) - valorPos);
  9.  
  10. file.Name = valorEntreAspas;
  11. file.Hash = File.Split(' ')[1];
  12. file.Size = Convert.ToInt64(File.Split(' ')[2]);
  13.  
  14. Globals.Files.Add(file);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement