When I use the DateAdd function in my C# code I receive the following error:
Error 1 The name 'DateAdd' does not exist in the current context
I am using the DateDiff function in the same routine and it work fine!!!
Any thoughts
Verne
Printable View
When I use the DateAdd function in my C# code I receive the following error:
Error 1 The name 'DateAdd' does not exist in the current context
I am using the DateDiff function in the same routine and it work fine!!!
Any thoughts
Verne
So you've added a reference to the VB.NET Runtime to your C# project? If so then hame on you :) or are you talking about different functions, e.g. T-SQL? You should use the DateTime and TimeSpan structures and their members to manipulate dates and times in C# code.
Also, are you really using C# 3.0, as in the version that is still in development? VS 2005 uses C# 2.0.