Question convert C++ code to C#

abanbedi

New member
Joined
Nov 2, 2014
Messages
2
Programming Experience
Beginner
MyFunction(int X, vector<int> &A) { int equal = 0, nequal = 0; for (int i = 0; i < A.size(); ++i) neq += A != X;
}
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,272
Location
Sydney, Australia
Programming Experience
10+
Instead of just trying to convert the code blindly like a dumb machine, try using the fact that you are a human being with the ability to reason. Think about what that code does and then write the best C# code you can to do that same thing. Do you understand what that cod does? If not then that should be your first order of business.
 
Top Bottom