I have this code ... and it says "ConvertUserData.UserData" is a type, not a valid in the given context and I have no idea why I just grabbed this code straight from microsoft docs
using Newtonsoft.Json;
public class ConvertUserData
{
public class UserData
{
public string type { get; set; }
public string email { get; set; }
public string password { get; set; }
}
public static string Convert(string _type, string _email, string _password)
{
var userData = new UserData
{
type = _type,
email = _email,
password = _password
};
return JsonSerializer.Serialize(UserData);
// ERROR HERE ⤴
}
}
