using System;
public class Program
{
public static void Main()
var testOfString = "Hello World";
var properties = testOfString.GetType().GetProperties();
foreach (var property in properties)
var valueFromProperty = property.GetValue(testOfString);
Console.WriteLine(valueFromProperty);
}