Reflection
Në shqip: Reflektimi
ShpjegimiSQ
Reflection-i i lejon një programi ta „shohë veten“ gjatë ekzekutimit: cilat klasa, veti dhe metoda ka, cilat atribute mbajnë — dhe t'i thërrasë sipas emrit. Framework-et si ASP.NET dhe Entity Framework e përdorin shumë.
EnglishEN
Reflection lets a program “look at itself” while running: which classes, properties and methods it has, what attributes they carry — and call them by name. Frameworks like ASP.NET and Entity Framework use it heavily.
Si ta mendosh
Si të shikosh veten në pasqyrë dhe të numërosh sa xhepa ke në xhaketë.
Lexoje në anglisht
Like looking in a mirror and counting how many pockets your jacket has.
Shembull kodicsharp
foreach (var v in typeof(Nxenes).GetProperties())
Console.WriteLine(v.Name); // Emri, Mosha