Thanks for help with the question I just submitted about anonymous classes. Now I understand more. Here's a bit more of an example:
public class abc { public xx doAction() { return ( new { ID = 5, Name= "Dave" } ); } public void doStart() { var a = doAction(); var b = a.ID; var c = a.Name; } } So am I correct in saying that the most ideal way to do this would be to declare a class XYX and use it like this:
public class abc { public XYZ doAction() { return ( new XYZ { ID = 5, Name= "Dave" } ); } public void doStart() { var a = doAction(); var b = a.ID; var c = a.Name; } } The class would be only used for this one data transfer between the two methods.