Recently I was exploring various new features of C# 7.x and recently I thought of looking into one cool feature Span but faced hard time to start. So to start with it, one need to install the nuget package System.Memory as
Make sure, you have Include Prerelease check box selected. After that we need to include System.Memory namespace. Once I wrote my first variable as
Upon building the project, I got the following error
I thought something as new as span, how come this be obsolete. I spent some time googling it with no specific result.
I looked my Visual Studio version which Visual Studio Enterprise 2017 v 15.4.2. I thought to update the same as there were few minor releases after that. After updating it to the latest available v15.6.2, I tried again and this time no error.
Initial error was not intuitive enough and updating Visual Studio, i consider last thing unless it is mentioned somewhere.
If you facing similar issue, this may be helpful to you as well.
Thanks
Brij
Pingback: Span: A new upcoming feature of C# | Code Wala