Based on your question, I could be way off. What do you mean by replacing ref? Are you looking to overload?
public void ReplaceSomething(int code, string name)
{
    // ...
}
public void ReplaceSomething()
{
    return ReplaceSomething(1, "test");
}
Edit: 
ok, so you need to return the code and the name what are the calculations that need to be made? Jon Skeet's answer about a tuple could be right, or you might need a POCO that contains the code the name and the replaced
public void ReplaceSomething(int code, string name)
{
    var replaced = new Replaced();
    replaced.code = code;
    replaced.name = name;
    var r;
    // do some replacement calculations
    replaced.replaced = r;
    return replaced;
}
public class Replaced {
    public string name {get; set;}
    public int code {get; set;}
    public string replaced {get; set;}
}