Question Converting Base 64 to a file

Joe12

Member
Joined
Mar 7, 2015
Messages
5
Programming Experience
Beginner
Hello Guys
I have a question.. how can i convert base 64 to a file and saving into dialog
please help?

Is better also if download the base 64 from pastebin.com text
thanks
 
JohnH is correct that you should provide some more specific information but I'll provide some general information that may help. Base-64 is a way to represent binary data as text. You can convert between a Byte array and a base-64 String and back using the ToBase64String and FromBase64String methods of the Convert class.

You say that you want to convert base-64 to a file, which doesn't really make sense. If you have base-64 data then you have text. Do you want to write that text to a file, or do you want to convert that text to binary data and write that to a file? It's pretty simple stuff either way. Either call File.WriteAllText or else call Convert.FromBase64String and File.WriteAllBytes.
 
1-Form1: I Mean that if i made a form which there are
TextBox and in that textbox i should write the pastebin download link and in pastebin text the base64 that i uploaded
and in the form there is a button that named convert
when i just click i want the pastebin text gets downloaded and converted into file (.exe)
2. Form2: Possible to add textbox and paste there the base64 without getting touch with pastebin?
just pasting the base64 into the textbox then clicking on convert file and also generate a file(.exe)

Thanks
 
You're a developer now, not a user, so you need to start thinking about these things as a developer, not as a user. A user thinks they click a button and a file appears and that is a single unit of work. It's not. There are numerous steps in the following:
1-Form1: I Mean that if i made a form which there are
TextBox and in that textbox i should write the pastebin download link and in pastebin text the base64 that i uploaded
and in the form there is a button that named convert
when i just click i want the pastebin text gets downloaded and converted into file (.exe)
It's your job as a developer to THINK about what that entails, i.e. what the individual steps are. You can then research each of those steps individually. Each step is elementary and therefore relatively easy to perform and, more importantly, to find information on. You solve each of the small problems and simply combine the solutions and you have solved the original problem. For instance, one step in there is to download a file. It doesn't matter what a file contains or where it's coming from or where it's going to, downloading a file is the same regardless, so you can easily find information on how to do that.
 
Back
Top