i have created an algorithm for u . Please try this
public static string GetString(string string1,string string2)
{
char[] str1 = string1.ToCharArray();
char[] str2 = string2.ToCharArray();
string finalString = "";
int length = str1.Length > str2.Length ? str2.Length : str1.Length;
for (int i = 0; i < length ; i++)
{
finalString = finalString + str1[i] + str2[i];
}
if (str1.Length > str2.Length)
{
int difference = str1.Length - str2.Length;
for (int i = 0; i < difference; i++)
{
char rem = str1[str2.Length + i];
finalString = finalString + rem;
}
}
else
{
int difference = str2.Length - str1.Length;
for (int i = 0; i < difference; i++)
{
char rem = str2[str1.Length + i];
finalString = finalString + rem;
}
}
return finalString;
}
Pass your string like below
string finalString = GetString("RAHUL", "MISHRA");
Hope this helps