'DateTime' is an ambiguous reference between

Class library usage, coding and language questions.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

'DateTime' is an ambiguous reference between

Post by omayer » Wed Jun 27, 2012 9:23 pm

I am getting the following error -
'DateTime' is an ambiguous reference between 'System.DateTime' and 'Ranorex.DateTime' (CS0104) - C:\SVNviews\Automation\MainSolution\PeopleSoftSuite\SandBox\Test.cs:369,18

Code: Select all

 public  void dateAndt()
    {
	DateTime time = DateTime.Now;              
	Console.WriteLine(time.ToString);  
	Console.ReadLine();
    }
Thankyou,
Tipu

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: 'DateTime' is an ambiguous reference between

Post by Ciege » Wed Jun 27, 2012 11:22 pm

You need to declare what type of DateTime variable you are using...
In your case, probably

Code: Select all

System.DateTime time = System.DateTime.Now;  
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: 'DateTime' is an ambiguous reference between

Post by omayer » Thu Jun 28, 2012 4:51 am

It worked, Thank you Ciege.
Tipu