Questions tagged [dynamicobject]

A Microsoft .NET Framework (version 4+) base class for specifying dynamic behavior at run time.

The DynamicObject class enables you to define which operations can be performed on dynamic objects and how to perform those operations. The DynamicObject class enables you to override operations like getting or setting a member, calling a method, or performing any binary, unary, or type conversion operation.

Inheritance Hierarchy

System.Object   
  System.Dynamic.DynamicObject

Reference: https://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject%28v=vs.110%29.aspx

171 questions
-1
votes
1 answer

Dynamically assign object properties and values in c#

Help me to create single object with dynamic properties. For example: Suppose we are getting the following object from database, var obj=[ {"name":"John", "age":35}, {"name":"Greesham", "age":37}, {"name":"Raman","age":42}, {"name":"Krish",…
Shabbir G
  • 1
  • 2
-1
votes
1 answer

Create component dynmically in QML (ListElement in ListModel)

I want to create members of an QML-ListModel dynamically. Static creation is no problem and works fine: ListModel{ id: sList ListElement{ url: "Res/ex1.jpg" time: 10 } …
Findus
  • 303
  • 1
  • 4
  • 17
-1
votes
1 answer

Construct a dynamic object from another object that has dictionary property with varying key-value pairs

I'm trying to collate the properties from an existing object that contains some static properties. The object also contains a Dictionary with key value pairs. These key value pairs should be dynamically added as properties to the new object I'm…
user1145404
  • 285
  • 1
  • 3
  • 9
-1
votes
1 answer

On click event dynamic object reference

I create an unknown amount of labels at run time and added on click event handlers. What is the code to find out which one of the labels I clicked on? Thank you.
epep
  • 51
  • 4
-3
votes
3 answers

how to check if an object is object[0]?

In debug mode, I'm hovering over my variable, and it shows that it is {object[0]}: However, this IF statement is never getting triggered. How do I check for this object[0] type?
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
-6
votes
1 answer

How to create objects dynamically?

I am new to coding, I'm trying to learn C++. I am making a roulette game, and I am trying to use classes and objects. I have a class called Bets, that stores the players bet choice in an object, it could be a number, or an outside bet like odd or…
mrmike
  • 398
  • 2
  • 4
  • 14
1 2 3
11
12