Compiler error by using ToString(string format)

Bug reports.
michael23
Posts: 9
Joined: Mon Jun 23, 2014 3:36 pm

Compiler error by using ToString(string format)

Post by michael23 » Mon Jun 23, 2014 3:43 pm

The code above will getting the compile error CS1501 - "Keine Überladung für die Methode "ToString" nimmt 1-Argumente an. (CS1501)".

Code: Select all

TimeSpan interval = new TimeSpan(0, 32, 45);
// Escape literal characters in a format string.
string fmt = @"mm\:ss\ \m\i\n\u\t\e\s";
string test = interval.ToString(fmt);
In "plain" Visual Studio this will be compiled without any problems. Why the ranorex studio can't compile this code?

mdgairaud
Posts: 87
Joined: Sun Aug 05, 2012 11:59 am
Location: Bilbao, Spain

Re: Compiler error by using ToString(string format)

Post by mdgairaud » Tue Jun 24, 2014 8:26 am

Hi michael23,

That's not a Ranorex bug. To solve your issue you must change the .NET framework of your Ranorex project to .NET4 . With .NET3.5 it will fail no matter the IDE you use


regards.