Take the 2-minute tour ×  This question already has an answer
here:  A question about naming local variables in a C# method
that takes a parameter of the same name Please see the code
below   private int DoSomething(string activationCode)
int ??WhatNameToChooseHere?? = Convert.ToInt32(activationCode);
What could be a good strategy to apply in the above scenario
Note: method paramter and local variable only differ by type
only  share|improve this question If activationCode is always a
valid Int32 why not make the method only accept it as Int32 and
in places you need the actual String use
activationCode.ToString()? You can even make an overload of
DoSomething that accepts a String, converts that to an Int32 and
calls the other DoSomething. –  Corak Apr 6 '13 at 5:01 A few
projects I worked on used the convention code is a text, id is
an integer number (int, long, uint, ulong). So we probably
would've called it activationId. Don't know if that's a good
convention, though, or if it should be applied h