Results 1 to 2 of 2

Thread: [3.0/LINQ] C# DateAdd Question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Des Moines, IOWA

    [3.0/LINQ] C# DateAdd Question

    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


  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    Re: [3.0/LINQ] C# DateAdd Question

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width