All of the example code that I have found online do not acknowledge that calling a function in an object initializer is possible.
The part of the previous post that I was trying to call attention to was this part which is in the "Object Initializer" portion of the PaletteSet(string name) constructor.Code - C#: [Select]
{ "Circle Radius", }
Hi MickD,
I failed to fully describe what I was talking about plus I had a function named "Initialize", so I'm sorry for the confusion.
Here is a link to C# feature that I am talking about:
How to: Initialize Objects by Using an Object Initializer (C# Programming Guide)https://msdn.microsoft.com/en-us/library/bb397680.aspx (https://msdn.microsoft.com/en-us/library/bb397680.aspx)
In some of their examples they are using the compiler created default constructor to create a new Student with and "Object Initializer" to establish the properties of that student.Code - C#: [Select]
Each property is named and there is no mention in this web page of calling a function named or unnamed inside of the "Object Initializer".
The part of the previous post that I was trying to call attention to was this part which is in the "Object Initializer" portion of the PaletteSet(string name) constructor.Code - C#: [Select]
{ "Circle Radius", }
The intended function is not named but it appears from ILSPY that the compiler is using the variable types to choose this function:Code - C#: [Select]
public Palette Add(string name, Control control);