Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
46 views

I would like to create a dynamic keyboard with 9 keys (nine), and I have created a JavaScript code that should create the buttons and place them in a 9x9 grid: for (var row = 0; row < 3; row++) { ...
user1396055's user avatar
2 votes
2 answers
139 views

I need to invoke a given DynamicObject with a given array of arguments. However, I am struggling on how exactly to do this. What I would like to do: using System.Dynamic; using System.Reflection; ...
user avatar
1 vote
1 answer
82 views

I have been working with creating a custom C# DynamicObject class. I have overloaded TryInvokeMember() and have it working except for some methods that use out parameters. I need to be able to get ...
Ken's user avatar
  • 101
0 votes
0 answers
77 views

Let's say that I have a a list of elements of 'n' size. I want to add 'n' properties in a dynamic object .How can I achieve this? We can't just hard code it because length of list is dynamic. So an ...
Tripurari Kumar Jha's user avatar
0 votes
1 answer
288 views

I have this dynamic Object to get the system.__comobject from Access: dynamic app = Marshal.GetActiveObject("Access.Application"); And now I open a form like this: app.Run("...
BeginnerWPF's user avatar
-1 votes
1 answer
469 views

I have a list of data and want to convert it into string format like headers and values separated. How can I achieve this in c#? Expected Result: dynamic data = { "values": [ [ ...
Mhd's user avatar
  • 821
0 votes
1 answer
189 views

I'm working with a lot of media files and turning their properties into a dynamic object to process them in VS 2022, C#, .Net 6 Core, and system.text.json. Most of the files have nested parameters. ...
Velocedge's user avatar
  • 1,504
-1 votes
1 answer
173 views

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}, {&...
Shabbir G's user avatar
0 votes
0 answers
73 views

How do I create a dynamic object that contains another dynamic object in a list? Let's say I normally have the following non dynamic classes. Public Class Foo { public bool IsSomething ...
Lana North's user avatar
0 votes
1 answer
147 views

I have a problem regarding anonymous objects in C#. The situation is as follows: I have a C# web app which does NOT use the traditional ASP.NET Razor engine, but instead uses the RazorEngine open ...
dabs's user avatar
  • 747
0 votes
1 answer
141 views

I have a class DocumentObject that extends DynamicObject to allow dynamic membership attributes. public class DocumentObject : DynamicObject { /// <summary> /// Inner ...
chiaDev's user avatar
  • 489
-1 votes
1 answer
287 views

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....
Findus's user avatar
  • 323
1 vote
1 answer
1k views

I'm writing a program in Delphi which includes creating the same dynamic object on multiple forms (never simultaneously), and then a procedure in another unit writes certain text to it. How the object ...
Wilmer Kluever's user avatar
0 votes
0 answers
767 views

I am using httpClient to an API endpoint. There are a couple of possible JSON results I could get back depending on if the call if successful or not. So I want to use a dynamic or ExpandoObject to ...
Brad Mathews's user avatar
  • 1,917
1 vote
0 answers
609 views

I have a custom type that derives from a DynamicObject and implements the IDictionary<string, object> interface. In order to make this setup work with Json.NET, I use a custom contract resolver (...
B Singh's user avatar
  • 143
0 votes
1 answer
154 views

The problem is to call Honda class display method. Which class method will be called depends upon the string variable that will be passed at runtime. Here I have used one parent class of Honda so that ...
sakshi singhal's user avatar
2 votes
2 answers
4k views

I want to create dynamic object so that I call the respective method of the class. All classes and interface is in different file but under the same folder Given: interface Method { public void ...
sakshi singhal's user avatar
0 votes
1 answer
248 views

I have a method that uses MediaInfo.exe to get information from a video file and returns a dynamic object. When the code runs, the information is readable inside the method but when I return the ...
Velocedge's user avatar
  • 1,504
1 vote
1 answer
1k views

I am trying to deserialize the JSON to a object using Newtonsoft.Json. Our input json request has commented line. { "paymentMethodToken": "bb3vph6", "...
Chandra Mohan's user avatar
0 votes
3 answers
3k views

Consider the following class - public class User { [Selected] public string Name { get; set; } public string Email { get; set; } public string Password { get; set; } [Selected] ...
atiyar's user avatar
  • 8,405
0 votes
1 answer
3k views

I am looking for a code example to illustrate how to create a Model class in .net core MVC using C#, where the class has dynamic properties. My API receives a http POST request and I am creating one ...
Mali Tbt's user avatar
  • 879
1 vote
1 answer
947 views

I have a requirement that several of my colleagues' configuration files should be displayed uniformly with the PropertyGrid control, which I have implemented with reference to the following post:https:...
Jack Zhang's user avatar
0 votes
0 answers
514 views

I am trying to typecast object inside dynamic object to a type which is passed as a parameter. I searched but couldn't find any specific solution to the issue. Firstly the structure of the class is as ...
Ankit Sharma's user avatar
0 votes
1 answer
372 views

<root> <source> <fields> <string propertyName="Status" class="System.String" nullable="true" valueInputType="all" displayName=&...
Akhil's user avatar
  • 31
0 votes
0 answers
365 views

So I've got a JSON string that I'm handling with json.net. I'm putting this into a dynamic object and then just accessing the values from that. dynamic data = JObject.Parse(JsonString); if(data !=...
cooltrain's user avatar
0 votes
1 answer
169 views

in c# form application, when i click the button i create a listBox. and I add Item to the ListBox from a TextBox When I click the button, I want the listBox to be created if it does not exist. ...
MUSTAFA CELAL GÜLER's user avatar
0 votes
1 answer
1k views

i would like to attach eventListener to dynamically created input Text or other objects. Since the objects are not yet present in the DOM or the objects are not visible, attaching an event to these ...
AmiStack's user avatar
0 votes
4 answers
1k views

I have a List which I would like to populate with different types of objects, trying to do it with object\dynamic, but it doesn't, even when casting. using asp.net core. See my code: public ...
Guy E's user avatar
  • 1,957
1 vote
2 answers
5k views

Having multiple classes doing many things, I am obliged to instantiate one of them, populate some properties and call a method. A sample would be having the below methods e.g. public class ...
Nick's user avatar
  • 533
1 vote
0 answers
24 views

Im making a REST Client for a TradeHouse API, it has a giant object with multiple attributes and i want to Convert it into a Class for me to use. For now as i dont want to make my own deserializer im ...
Nico Walsemann's user avatar
0 votes
2 answers
73 views

I define a DynamicObject. I have created a list of DynamicObjects with the same structure and link them to a WPF GridView. I allow editing of some of the properties via the grid. As the ...
Lance's user avatar
  • 403
0 votes
2 answers
2k views

Using JavaScript, how can I set property of an object that already has property with the same name? For example, what i want to output is: var obj = { name: "foo" }; obj[name] = "baz"; Normal ...
Mert's user avatar
  • 566
-1 votes
1 answer
1k views

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 ...
user1145404's user avatar
1 vote
0 answers
192 views

I am developing a .dll in C# that makes extensive use of DynamicObject. The .dll in other C# projects works fine, however in VB.NET TryGetMember doesn't seem to be called. Instead TryInvokeMember is ...
atsekoff's user avatar
3 votes
2 answers
2k views

I have a custom type derived from the DynamicObject type. This type has fixed properties declared in the type. So it allows the user to provide some required properties in addition to any dynamic ...
B Singh's user avatar
  • 143
0 votes
1 answer
73 views

I have a problem where I data for an object, for example billing file, where the data elements are different from client to client. More specifically the number of fields within the data and of ...
Troy Crowe's user avatar
1 vote
0 answers
508 views

I would like to create viewmodel properties in runtime. I'm not so familiar with MVVM in UWP. Rather windows forms. In the past I created custom class object with reflection and I had possibility to ...
Jakub Okaj's user avatar
0 votes
2 answers
205 views

I need a way to provide a Dynamic get members and set for a given class. I want to be able to write code like this: ns1.Resource.Field1 = "Hello"; string myField = ns1.Resource.Field1; where ns1 ...
Haddar Macdasi's user avatar
0 votes
0 answers
109 views

In our .NET Core project we have service references for SOAP APIs. But since we have a lot of them, we implemented a generic method which invokes the method in SoapClient so that we can just call: ...
Grigor's user avatar
  • 3
1 vote
1 answer
995 views

I have a class EntityBase that derives from DynamicObject without an empty default constructor. // this is not the actual type but a mock to test the behavior with public class EntityBase : ...
user1859022's user avatar
  • 2,785
0 votes
1 answer
1k views

I have a class inheriting from DynamicObject In this class I have a TryGetMember that I try to evaluate to a static class. How can TryGetMember overriden from DynamicObject result in a static class? ...
LosManos's user avatar
  • 7,822
1 vote
1 answer
2k views

I am creating some custom API. What I need is pass some object to the api that have "static" required propreties and dynamic optional properties. I have created a dynamic custom object like this: ...
Simone's user avatar
  • 2,420
5 votes
0 answers
99 views

consider I have this simple c# code: dynamic obj = new ExpandoObject(); obj.FirstName = "John"; obj.LastName = "Doe"; I want to add method which will return full name, John Doe in this case. I know ...
Arkadi's user avatar
  • 1,395
2 votes
0 answers
230 views

I encountered a WCF service which returns a dynamic object. But in debug mode the properties of dynamic objects were not allowed to visible. How to see dynamic object property values while debugging. ...
Aslam Jiffry's user avatar
  • 1,312
1 vote
1 answer
996 views

Previously I was working on an implementation of DynamicObject data binding (see Dynamic object two way data binding), and the solution works great. Since then I have run into the need to be able to ...
Aaron Murray's user avatar
  • 2,030
0 votes
1 answer
2k views

i'm learning wpf and binding and all and i have a gridview and a custom object i'm trying to bind a list of custom objects to the grid my custom object is designed like this Public class myObject ...
Slite's user avatar
  • 159
4 votes
1 answer
289 views

I have a class that derives from DynamicObject class. On calling JsonConvert.SertializeObject, none of the dynamic properties are serialized. Class is defined as, public class Component : ...
Usman Khan's user avatar
0 votes
1 answer
1k views

I have a class called CoverageBase with properties say A, B, C. And now based on some checks i need to append n number of properties say D and E properties in to this CoverageBase class along with my ...
Nithin Paul's user avatar
  • 2,229
0 votes
1 answer
1k views

We've searched all over stack overflow and similar sites for something that will work for our app, but everything gets us only halfway there. We have an application that allows the user to drag and ...
Vertigo's user avatar
  • 21
0 votes
1 answer
53 views

I have a dynamic object called Manifest and have members added in it like public dynamic manifest={ Type=30, components ={ .. something} } I want to expand this dynamic ...
the_coder_in_me's user avatar