Using .NET 5, I have two Lists of the same class List. One was generated from Entity Framework from a SQL database and the other using Oracles DataManagedAccess library (if it matters) from a Oracle database. At this point, per what VS debugger shows, the strings in question are correct.
foreach (var PairedCustomer in PairedCustomers)
{
bool MakeProp = false;
//compare properties we care about (defined in mapping)
foreach (string prop in PropertiesWeCareAbout)
{
string tProp = PairedCustomer.TargetCustomer.GetType().GetProperty(prop).GetValue(PairedCustomer.TargetCustomer, null).ToString();
string dProp = PairedCustomer.DCustomer.GetType().GetProperty(prop).GetValue(PairedCustomer.DCustomer, null).ToString();
What the issue is, in the above code "PairedCustomer.TargetCustomer" has a string value in the object as "für Fischerei" however, the tProp value is showing up as: "f?r Fischerei". It does this with all umlaut and similar characters but only for the List that came from Oracle. Why does it appear correct in the List (via VS debugger), but is replaced with ? when using reflection (Yes... I hate using reflection, but I don't have a better way at the moment).