Categories > Coding > C# >
Cannot implicitly convert type 'int' to 'string'
Posted
Title says it all. I am using ToString() but the int doesn't want to cooperate with me.
Code that errors:
LabelProgress.Invoke(new Action(() => LabelProgress.Text = int.Parse(Math.Truncate(Percentage).ToString())));
Added
@_realnickk thanks, but now I am trying to do DownloadFileAsync, and when it's done then do things with it. How can I do that? It's downloading in background, but I want to detect when it completed.
Cancel
Post
Random quote here...
Replied
@VoidableMethod I would use async w/ await to check if its finished
WebClient wb = new WebClient();
async Task DownloadData()
{
await wb.DownloadFileTaskAsync(new Uri("http://anotherexample.com"), "c");
// do something with your downloaded data
}
async Task InitAsync()
{
await DownloadData(); // download the data
}
Cancel
Post
novaline ontop
Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline
Random quote here...
Replied
@VoidableMethod Yea where you call the function from just dont add the await part and it'll download in the background and still do whatever once its done
Cancel
Post
novaline ontop
Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline
Replied
amazing how you're actually gonna make an actual boostrapper for your god tier exploit
Cancel
Post
Added
@YeemiRouth why u have a task that downloads content and another task to call that task :skull: also no wc.dispose() and uri is redundant (unless i'm wrong)
Cancel
Post
"Questionable intellegence, but I like the mystery" - CubeFaces
https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png
Replied
@SeizureSalad God can you stop thinking I'm over valuing my exploit? Like for f sake other people say it's good and to choose their but I can't. is it about rep? about that you know them, you're friends with them? All I say is Carmel is a good exploit in my opinion and others too.
Anyways, there has been a vootstrapper before but it was broken. I will do one in a couple days, this one was just for a experiment.
Cancel
Post
Random quote here...
Replied
@YeemiRouth AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
DISPOSE THE WEBCLIENT
Cancel
Post
"Building blocks of imagination, united in the virtual realm, where creativity thrives and friendships ignite. Welcome to the Roblox revolution!" - chatgpt
"Questionable intellegence, but I like the mystery" - CubeFaces
https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png
Replied
had a stroke reading that code
also LabelProgress.Text accepts string while int.Parse returns int lmfao
also also use wpfffffffffffffffffffffffffff
Cancel
Post
https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png
Replied
@RiceUsesArchBtw no i won't use wpf. I am talking about the code. Also what's wrong with the code? If you had "stroke" while. reading it then most likely you don't understand it.
Cancel
Post
Random quote here...
Replied
you used int.Parse which returns integer while LabelProgress.Text only accepts string
thats the problem
Cancel
Post
https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png
Replied
i agree with 'rice cracker' your code is really messed up.
Cancel
Post
novaline ontop
Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline
Users viewing this thread:
( Members: 0, Guests: 2, Total: 2 )
Cancel
Post