suppose I have the following group of static functions
here I sent the variable via the link:
public static void ProcessEmailMessage(ref string HTML)
{
ModifyLinks(ref HTML);
AddFakeImage(ref HTML);
}
public static void ModifyLinks(ref string HTML)
{
}
public static void AddFakeImage(ref string HTML)
{
}
and here I sent a variable by value
public static string ProcessEmailMessage(string HTML)
{
HTML = ModifyLinks(HTML);
HTML = AddFakeImage(HTML);
return HTML;
}
public static string ModifyLinks(string HTML)
{
return HTML;
}
public static string AddFakeImage(string HTML)
{
return HTML;
}
which makes more sense, and is there a performance difference between 2?
source
share