public class TestClass
{
public string property1 { get; set; }
public string property2 { get; set; }
internal string property3 { get; set; }
internal string property4 { get; set; }
internal string property5 { get; set; }
}
में आंतरिक गुणों के माध्यम से कैसे पुन: प्रयास कर सकता हूं, मैं निम्नलिखित लूप के साथ गुणों के माध्यम से पुन: प्रयास कर सकता हूं, लेकिन यह केवल सार्वजनिक गुण दिखाता है। मुझे सभी गुणों की आवश्यकता है।मैं C#
foreach (PropertyInfo property in typeof(TestClass).GetProperties())
{
//do something
}
भी देखें http://stackoverflow.com/questions/16024006/how-do-i-look-up-the-internal-properties इसके लिए एक संस्करण के लिए -एक-एसी-तेज-श्रेणी-संरक्षित-रक्षा। – nawfal