User-1401876114 posted
Hello All,
There is a single method which is being called about close to 5 times in each line back to back. I need to re-write it for performance.
Written in simplified way.
public String GetAlternateAdress(int SSN, enum typeCode)
{
switch(typeCode)
{
case 1: address = "A";
.....
....
....
return address;
}
Calling method
void main()
{
string Alt1 = GetAlternateAdress(123,enum.value);//1
string Alt2 = GetAlternateAdress(123,enum.value);//2
string Alt3 = GetAlternateAdress(123,enum.value);//3
string Alt4 = GetAlternateAdress(123,enum.value);//4
//further code
}