Solution : The type or namespace name 'Date' could not be found (are you missing a using directive or an assembly reference?)
Error Codes:
< msxsl:script implements-prefix="vbadud" language ="C#" >
< ![CDATA[
public string Defaulted(Date RetDate)
{
return "Defaulted";
}
]] >
< /msxsl:script >
Solution: The type or namespace name 'datetime' could not be found (are you missing a using directive or an assembly reference?)
Error Code :
< msxsl:script implements-prefix="vbadud" language ="C#" >
< ![CDATA[
public string Defaulted(datetime RetDate)
{
return "Defaulted";
}
]] >
< /msxsl:script >
Use DateTime instead of Date or datetime in C#
Corrected Code
< msxsl:script implements-prefix="vbadud" language ="C#" >
< ![CDATA[
public string Defaulted(DateTime RetDate)
{
return "Defaulted";
}
]] >
< /msxsl:script >
Name Space Date Time Error
Here is the solution. Hover your mouse in the word Date or DateTime and right click and pick "System".
ReplyDeleteIt will tell the Visual Studio compiler to grab it from the System class. Then try to rebuilt Ctrl+Shift+B. No more error or warning for that one.
Cheers,
Ronald Pringadi
Worked well in VS2008
DeleteTghanks Ronald Pringadi. It works a marvel
ReplyDeletesorry it does work on visual studio 2010.. please help!
ReplyDelete