Categories > Coding > C# >

Cannot implicitly convert type 'int' to 'string'

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

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())));

 

  • 0

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.

  • 0

Random quote here...

Posts: 152

Threads: 9

Joined: Feb, 2022

Reputation: -34

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
}

  • 0

novaline ontop

 

Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

Replied

@YeemiRouth So I can just do wb.DownloadFileAsync?

  • 1

Random quote here...

Posts: 152

Threads: 9

Joined: Feb, 2022

Reputation: -34

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

  • 0

novaline ontop

 

Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline

SeizureSalad

i love femboys

Posts: 1159

Threads: 79

Joined: Mar, 2021

Reputation: 40

Replied

amazing how you're actually gonna make an actual boostrapper for your god tier exploit

  • 0

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)

  • 0

"Questionable intellegence, but I like the mystery" - CubeFaces

https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

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. 

  • 0

Random quote here...

Posts: 1008

Threads: 66

Joined: Sep, 2021

Reputation: 20

Replied

@YeemiRouth AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 

 

DISPOSE THE WEBCLIENT

  • 0

"Building blocks of imagination, united in the virtual realm, where creativity thrives and friendships ignite. Welcome to the Roblox revolution!" - chatgpt

 

SeizureSalad

i love femboys

Posts: 1159

Threads: 79

Joined: Mar, 2021

Reputation: 40

Replied

@_realnickk no now that i look back at it i was a bit harsh lol

  • 0

"Questionable intellegence, but I like the mystery" - CubeFaces

https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png

RiceUsesArchBtw

rice cracker

vip

Posts: 465

Threads: 19

Joined: Aug, 2021

Reputation: 39

Replied

had a stroke reading that code


also LabelProgress.Text accepts string while int.Parse returns int lmfao

 

also also use wpfffffffffffffffffffffffffff

  • 0

https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png

Posts: 2014

Threads: 198

Joined: Apr, 2021

Reputation: 16

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. 

  • 0

Random quote here...

RiceUsesArchBtw

rice cracker

vip

Posts: 465

Threads: 19

Joined: Aug, 2021

Reputation: 39

Replied

@VoidableMethod

you used int.Parse which returns integer while LabelProgress.Text only accepts string
thats the problem

  • 0

https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png

Orbx

none

Posts: 37

Threads: 1

Joined: Feb, 2022

Reputation: 1

Replied

i agree with 'rice cracker' your code is really messed up.

  • 0

Posts: 152

Threads: 9

Joined: Feb, 2022

Reputation: -34

Replied

@SeizureSalad Grabbed documentation 

  • 0

novaline ontop

 

Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline

Next >>>

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )