Reputation: 5409
I'm including this line: using System.Data.SqlTypes.SqlXml;
in order to make the below code work.
SqlXml sqlXml = reader["ScenarioData"].GetSqlXml();
The GetSqlXml();
error is solved by including the above using line, but then I get the error that "System.Data.SqlTypes.SqlXml
is a type not a namespace"
Am I missing a dll reference or something? I can't find it.
Upvotes: 1
Views: 713
Reputation: 5689
SqlXml
is a type, not a namespace.
use this instead: using System.Data.SqlTypes;
Upvotes: 0
Reputation: 22794
This is not like Java, you don't import separate classes. You import whole namespaces. Try this instead:
using System.Data.SqlTypes;
Alternatively, if you really want to follow Java rules, use this code instead:
using SqlXml = System.Data.SqlTypes.SqlXml;
Upvotes: 4