Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

String escape?

$
0
0

In the samples for Add-Type there is the following code:

    PS C:\>$source = @"
    public class BasicTest
    {
    public static int Add(int a, int b)
    {
    return (a + b);
    }
    public int Multiply(int a, int b)
    {
    return (a * b);
    }
    }
    "@

When I try to enter this from the IDE I just get a bunch of squiggly red lines (errors). What is the correct syntax to get the samples for Add-Type to work?

Thank you.


Kevin Burton


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>