Reputation: 395
I am getting quite confused as to where I am getting this compiler error from. If anyone could help I would be very grateful. Here is the the error (I have 16 cases of it):
Error 6 error C2039: 'ToInt16' : is not a member of 'System::String' c:\users\****.****\documents\visual studio 2005\projects\cpas1\cpas1\Form1.h 1265
and here is the a line of code affected:
part1Quantity = this->txtPartQuantity1->Text->ToInt16(0);
Upvotes: 3
Views: 246
Reputation: 24413
.NET string doesn't have a ToInt16 method.
If you are doing something similar in c# and using string.ToInt16, chances are it is implemented as an extension method.
extension methods cannot be called as object member functions from managed C++
Upvotes: 2