Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Convert any class to a keyvaluepair

[Test]
public void DoStuff() {
  List<object> things = new List<object>() {
    new ResultA(){Date = DateTime.Now, Month = 34}, new ResultB(){Count = 1, Jewels = 4, Number = "2", Update = "0"}
  };

  foreach (var thing in things) {
    foreach (var property in thing.GetType().GetProperties()) {
      Trace.WriteLine(property.Name + " " + property.GetValue(thing));
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# place all keys in dictionary into array 
Csharp :: dapper query list of parameters 
Csharp :: player movement script unity 
Csharp :: how to backup terrain in unity 
Csharp :: how to get the askii code of a char in c# 
Csharp :: REMOVE BOTTOM TAB XAMARIN FORMS 
Csharp :: Show Form on Second Monitor 
Csharp :: asp.net unregister client script 
Csharp :: .net core best package for scheduler 
Csharp :: html tag inside razor tag 
Csharp :: best programming language for compression ratio 
Csharp :: how to create more accurate searching c# 
Csharp :: unity3d spin wheel 
Csharp :: C# if...else if Statement 
Csharp :: go down a line in function documentation 
Csharp :: What does "DateTime?" mean in C#? 
Csharp :: C# is folder 
Csharp :: Query Parent-GrandChild single 
Csharp :: unity recttransform set anchor 
Csharp :: C# Project File Create 
Csharp :: asp.net core mvc not triggering client side validation 
Csharp :: return array in c# 
Csharp :: c# string contain double quote 
Csharp :: rating iOS game in unity 
Csharp :: C# String Manipulation: 
Csharp :: how to resize a panel unity 
Csharp :: 0.8 dikali 0.8 
Csharp :: cancellationtoken.linkedtokensource c# example 
Html :: email regex html pattern 
Html :: bootstrap 4 cdn 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =