The _ecvt function converts a double to string. This function stores up to
count digits of a value as a string,
The position of the decimal point and the sign of value can be obtained from
dec and sign after the call.
_ecvt(Math.Abs(val),14,&dec,&sign);
So how can I do this function call in C#, since C# does not have the _ecvt
function.
there is an append function on a string in C++, that appends a string to
another string starting at a specific position & the user can specify how
many elements to append, for example:
str1.append(str2, 1, 2);
What method in C# replaces the C++ append function?
There is a function in C++ to convert an interger to a string:
_itoa(deg, bufdeg, 10) ;
What is used in C# to replace this funtion _itoa?
Thanks
"Daniel O'Connell [C# MVP]" wrote:
"rgarf" <rg***@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...I am converting a C++ application to C#, What in C# replaces the following
C++ functions:
overloaded opertaor=
Nothing, C# doesn't allow overriding the assignment operator.
_ecvt(Math.Abs(val),14,&dec,&sign) ; //this function converts a double to
a
string & puts the position of the decimal point & the sign of value in the
dec & sign paramaters, and it lets you specify how many digits you want to
store in the string(14)
I don't understand waht you are asking here.
I noticed that the C# math library only has an abs() method not a fabs()
method, what would replace the fabs method?
Math.Abs deals with integers and floating point numbers, does fabs offer
anything else?
What is used in C# to replace sprintf?
String.Format is the closet function.