If Statement condition c# is not working

Hi @Konrad_Mierzwa , my project is in C#,
image

However I have also tryied this :

if (strAmazonStorageCost.Contains(“< $”))
{
strAmazonStorageCost.Replace(“< $”,“”);
}
else
{
strAmazonStorageCost.Replace(“$”,“”);
}

Thas is suposed to be C # syntax , but got an error too:

Error ERROR Validation Error Invalid expression term ‘if’
; expected

I dont know where else put the ; ???

Thanks!