Help running script?

I have this code Module cashthing Sub Main() Dim price As Decimal Dim quantity As Decimal system.console.write(“Enter Price”) startingK = system.console.readline() system.console.write(“Enter quantity:”) endingK = system.console.readline() ‘do calculations cost = price * quantity tax = price * quantity * 1.15 system.console.writeline(“the cost is: ” & formatcurrency(cost)) system.console.writeline(“the tax is: “) & formatcurrency(tax)) End Sub End […]

How can I speed things up

This literally took 15 minutes to complete for 200k lines of text: string[] oldArray = textBox1.Text.Trim(‘r’).Split(‘n’); textBox1.Clear(); int r = 0; for (int s = 0; s < oldArray.Length; s++) { if (oldArray[s].Contains(“mdm”)) { oldArray[s] = “”; } textBox1.Text = textBox1.Text + oldArray[s] + “n”; I have tried using StringReader but the endless while wouldn’t […]

Swapping Integers

There was a post yesterday on another subreddit (I can’t remember which and can’t find the post now) in which I saw something kind of neat in another programming language that I wanted to see if it was possible in PowerShell. So here is the problem: You have 2 integer variables and you want to […]