Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Predefined type 'System.TypedReference' is not defined

$
0
0

I have code in asp.net core RC2. 

public class Program
    {
        [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
        public static void Main(string[] args)
        {
            string str = "My first string was ";
            TypeReference tr = __makeref(str);
            IntPtr ptr = **(IntPtr**)(&tr);
        }
    }

The error is ErrorCS0518Predefined type 'System.TypedReference' is not defined or imported.

I need to change project.json file. But how to make it working?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



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