Let's say we have a simple class
public square fu {public string FooName; }
Now we want to do some simple work on that.
// What to do here? }
If I also knew what the method of calling is, then maybe I can find the rest of Pais.
You want to change a list of your class into an array of wires. The ideal method for this is to select The name of the lambda expression selection method that gives you name, which is just "select the name for each element". Then you have to input the output as an array. , which runs on each element on the calculator and makes a new calculation based on the type you return.
string [] fooNames = listOfFoos.Select (foo = & gt; foo.FooName) .oir (); Or, using other syntax:
string [] fooNames = (foo from Foo in the list, select foo.FooName) .ToArray () ;
Comments
Post a Comment