Hello everybody.
I tried this:
$code = @"
using System;
namespace HelloWorld
{
public class Program
{
public static void Main(){
Console.WriteLine("Hello world!");
}
}
}
"@
Add-Type -TypeDefinition $code -Language CSharp
iex "[HelloWorld.Program]::Main()"
It work.
But when I change the "$code" variable script and "add-type" it secend time it show me an error.

Why i can't update secend time my script?
How can i do it?
Thanks for help.