0
How to download TXT in memory, read and save in a variable separated by ,
the words? I wanted to read with the slip (I think it’s the name, I don’t remember...).
Here it is, it downloads the file to RAM:
public static bool CheckUpdate()
{
System.Net.WebClient wb = new System.Net.WebClient(); //Classe usada para baixar o arquivo de info
byte[] buffer = wb.DownloadData(remoteVersionFile); //Baixa o arquivo de info para a memória
System.IO.MemoryStream mem = new System.IO.MemoryStream(buffer); //Cria um Stream para o buffer
System.IO.StreamReader memReader = new System.IO.StreamReader(mem); //Cria um leitor para o Stream
Version remoteVersion = new Version(memReader.ReadToEnd()); // Lê a versão do arquivo para uma variável do tipo Versio;
memReader.Close();
mem.Close();
Version localVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; // Retorna a versão do Assembly (Programa) em execução
return remoteVersion > localVersion; //Retorna true se a versão na internet for maior que a versão do aplicativo em execução;
}`
Here is my variable, which I keep in txt and read in txt when it is in ram:
"NoiseFix.cs",
"HPArmorDigital.cs",
"Nomes das ruas.cs",
"Neon.cs",
"Indicador cansaço.cs",
"Sensitivity.cs",
"Strobs.cs",
"Memoryfix.cs",
"MFGTAVH.cs",
"Fogo no escapamento.cs",
"PontosCardeais.cs",
"Xenon.cs",
"MarcasDeTiro.cs",
"Zoom.cs",
"PerPixelLighting.cs",
"Sun.cs",
"Sunlight.cs",
"RainModEffect.cs",
"SnowFlakes.cs",
"Recarregararma.cs",
"Exhaust.cs",
"Skybox.cs",
"Fontfixed.cs",
"camshake.cs",
"turn_indicators.cs",
"particles.cs",
"Skyboxv2.cs",
You seek the
Split()
?– Leandro Angelo
Yes I want to download the TXT to the ram and read it and save in a variable and it would be with Split to read, the function to download the ram I have now need only read the TXT saved in the ram....
– Jonathan Ribeiro
Why don’t you read and write Txt with File.Readalllines() File.Writealllines()? Much simpler
– SUR1C4T3