Can someone pls explain me this code line or send me the link of the website where this is explained?
I know that there is a website but i can't find it... anon's you are my last help...
Type[] types = typeof(variable).Assembly.GetTypes().Where(t => t.BaseType == typeof(variable)).ToArray();
return (variable)Activator.CreateInstance(types[_rndGen.Next(types.Count())], formsize);
I am not familiar with this language in particular, but the first part gathers all subtypes of the given variables type in an array, and the second part creates a new object of a randomly choosen subtype.
>>335681
spaghetti coding needs no explanation
>>335681
but I can say that first line creates an array of types that has variable's type as their base
return part, picks one of these types at random creates an instance of it
then casts it to variable (I am not sure how this works) and returns
>>335725
It's perfectly cromulent procedural/functional.
Maybe familiarise yourself with what's been going on in programming in the past seven years?
>>335731
this is bad programming no matter how you look at it...
>>335738
No it isn't. It looks like that to you, because creating a pipeline by appending method calls looks weird to you, because you don't have any experience of the procedural-with-functional paradigm.
Presumably because you've been under a log since before 2010.
>>335744
no it is not bad programming just because of the piping