Click here to Skip to main content
15,942,292 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is the equivalent statement of
C++
typedef ATL::CStringT< TCHAR, StrTraitMFC_DLL< TCHAR > > CString
in C# ?
Actuallly I am writing the code in C# from scratch. I have the written code in C++. My task is to write the equivalent code in C#.

What I have tried:

I know its the active template library. It is used for GUI purpose.But I do not know much about that.
Posted
Updated 9-May-18 19:05pm
v3
Comments
F-ES Sitecore 9-May-18 5:14am    
"My task is to write each and every line of c++ to its equivalent C#."

That's a task doomed to fail, languages don't always have equivalents. Forget about converted code line-by-line, instead do it feature by feature, work out what the C++ does then work out how to do that in c#. If code could be converted line by line you'd have found a tool that does this for you.
hamid18 9-May-18 5:25am    
yeah you are right if line by line conversion is possible then I could have used a conversion tool.
Jochen Arndt 9-May-18 6:01am    
There is no equivalent statement. The equivalent object type is String.
But you have to find also the equivalent C# methods for the CString methods used by the C++ code.

1 solution

There's only one string type in C#. It's called string.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900