I have such piece of code:
string suffix = "wallpapers\\";
string extenstion = ".jpg";
string[] wallpapers;
.....
void SetWallPapers()
{
wallpapers = new string[] {
suffix + "1" + extenstion,
suffix + "2" + extenstion,
suffix + "3" + extenstion,
suffix + "4" + extenstion,
};
}
Is there any variant to make lambda-declaretion in array content like:
( pseudo-code, idea only! )
wallpapers = new string[] { ( () => { for i = 1 till 4 -> suffix + i + extension; } ) }
Any suggestions?