Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

loop over object properties c#

foreach (PropertyInfo prop in someObject.GetType().GetProperties())
{
    Console.WriteLine($"{prop.Name}: {prop.GetValue(someObject, null)}");
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to detect a mouse click in unity 
Csharp :: quit button unity 
Csharp :: c# find start and end of month from object date 
Csharp :: how to set serial number in gridview in asp net 
Csharp :: vb.net wait 1 second 
Csharp :: asp.net core multiple get methods 
Csharp :: make winforms full-screen c# 
Csharp :: c# open folder in explorer 
Csharp :: how to convert float to int in c# unity 
Csharp :: how to find object by ag unity 
Csharp :: unity mouse click m 
Csharp :: wpf bind to self 
Csharp :: enable script unity 
Csharp :: c# get free space on drive 
Csharp :: pause audio unity 
Csharp :: c# datagridview clear all rows 
Csharp :: vscode c# how to change to externial terminal 
Csharp :: convert int to double c# 
Csharp :: c# resize image keep aspect ratio 
Csharp :: c# remove non-alphanumeric characters from string 
Csharp :: C# cycle through directory 
Csharp :: c# print 
Csharp :: #region in c# 
Csharp :: move towards target unity 
Csharp :: c# require administrator permissions 
Csharp :: Add float value to ui text in unity 
Csharp :: c# download file 
Csharp :: string to uint c# 
Csharp :: unity rotate vector around point 
Csharp :: unity temperature to colour 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =