Skip navigation

You can:


using System.Runtime.InteropServices;

...

public static void test( [In][Out] ref int something )
{
    something = 5 ;
}

Be sure to add the using statement as shown!

Note if you try and do:

public static void test( out ref int something )
{
    something = 5 ;
}

You get:

Error 1 A parameter cannot have all the specified modifiers; there are too many modifers on the parameter

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: