Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get property using string

 public static object GetPropValue(object src, string propName)
 {
     return src.GetType().GetProperty(propName).GetValue(src, null);
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to stop player rotating when hit by object 
Csharp :: c# rename file 
Csharp :: convert request.form to dictionary c# 
Csharp :: restart animation unity 
Csharp :: c# null check can be simplified 
Csharp :: Attach Mixer to Audio Source via script 
Csharp :: xamarin timer example 
Csharp :: hello in c# 
Csharp :: how to unfreeze a rotation in a collider unity 2d 
Csharp :: revitapi 
Csharp :: gravity script unity 
Csharp :: avoid autocomplete input text asp.net 
Csharp :: remove element from sting array c# 
Csharp :: the .net core sdk cannot be located unity 
Csharp :: ask for administrative permission 
Csharp :: blazor alert 
Csharp :: C# Cast double to float 
Csharp :: emboss button in android app 
Csharp :: c# get random double in range 
Csharp :: how to check if a value is inside an array c# 
Csharp :: unique id c# 
Csharp :: c# method summary new line 
Csharp :: c# how to check if two lists have same values 
Csharp :: small modal popup bootstrap 
Csharp :: run linux command in c# 
Csharp :: deltatime 
Csharp :: singleton unity 
Csharp :: unity check if a animator parameter trigger is activated 
Csharp :: json.net deserialize dynamic 
Csharp :: How do i destroy a prefab without the error? 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =