Tuesday, 16 February 2021

MVC - Fix Error - The type or namespace name 'XmlDocument' could not be found

 Watch this example on YouTube


 this code will give me the error

   XmlDocument doc = new XmlDocument();

 

 The type or namespace name 'XmlDocument' could not be found (are you missing a using directive or an assembly reference?)    


To fix it add

using System.Xml;

No comments:

Post a Comment