I am probably making a dumb error but I cannot see it.
I added a custom class to my project following the simple Newtownsoft example here.
namespace MyApp
{
public class Secrets
{
public string Test {get;set;}
}
}
But when I go to reference the class in my Program.cs:
namespace MyApp
{
static class Program
{
[STAThread]
static void Main()
{
<snip>
string json = FetchJson();
var MySecrets = JsonConvert.DeserializeObject<Secrets>(json); // this line
}
}
}
Visual Studio underlines <Secrets>
and says the type or namespace 'Secrets' cannot be found. But the project compiles without error.
If I change the name of the class to Sekrets
then Visual Studio finds it and is happy.
P.S. And if I then rename the file from Sekrets.cs
back to Secrets.cs
and let VS make the global change, then VS remains happy, no error, no red underlining.