I have the following code:
Dictionary<string, string> values = new Dictionary<string, string>();
values.Add("key1", "value1");
values.Add("key2", "value2");
string json = JsonConvert.SerializeObject(values);
but it's always throwing an exception:
System can not find the file specified
You should try the following
Run your code again and it should work
why does this error occur
Normally when you copy the project from another system, the referenced are there in the project files but the files themselves do not exist. You can restore the nuget packages to resolve the issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.