Questions tagged [getproperties]

49 questions
1
vote
2 answers

How to get properties of a type inside an object

I have this code. I receive several lists as parameters that I insert into a list of objects. public static void SaveTransactionsToSeparateFiles(List genRecList, List genDilList, List genAccList, string…
Rui Martins
  • 2,164
  • 7
  • 33
  • 52
0
votes
2 answers

How can I access an object's property from the PropertyInfo?

When I foreach through an object's properties and end up with a PropertyInfo, how can I access the actual property of the object? @foreach(var propertyInfo in Model.Entity.GetType().GetProperties()) { if (propertyInfo.PropertyType !=…
Benjamin
  • 3,134
  • 6
  • 36
  • 57
0
votes
1 answer

Stress test reading properties with getPropertie() return null in java application

I have a jar that contains a class that, among other things, reads a properties and extracts some properties with getProperty in the constructor. When I test the jar and I stress it with jmeter by raising parallels threads, only in some cases it…
0
votes
2 answers

C# Not getting all properties from GetProperties

I'm going around in cricles changing and rechanging not understanding why I'm not getting the values I want to, maybe someone can shed some light on it. I have this object var result = new GetRatePlanListResponse { RatePlanId =…
0
votes
1 answer

Why does an infinite recursion error appear while processing JSON.stringify

function repErr(key, value) { let error = {}; Object.getOwnPropertyNames(value).forEach(function (key) { error[key] = value[key]; }); return error; } When I call JSON.stringify(err, repErr) i see an error too much recursion in…
0
votes
1 answer

How to get properties from parent class

I want to use GetProperties to get the properties from the parent class via the child and, despite researching this, have been unsuccessful. I tried the next without any result: PropertyInfo[] fields = t.GetProperties(); PropertyInfo[] fields1 =…
Kenzo_Gilead
  • 2,187
  • 9
  • 35
  • 60
0
votes
1 answer

getProperty() always returns null - Java

In the following code the getProperty() method always returns null, even if I add a default for loadNumberOfAccounts(); so its not null, the next method which uses getProperty() will return null. storing the properties works…
0
votes
1 answer

How to I get the parent property's class type after using GetProperties to get a list of properties on a class?

I'm using GetProperties to get a list of properties for a class. Dim properties As List(Of PropertyInfo) = objType.GetProperties(BindingFlags.Instance Or BindingFlags.Public).ToList() For Each prop As PropertyInfo In properties 'how do I get the…
thecoolmacdude
  • 2,036
  • 1
  • 23
  • 38
0
votes
1 answer

Type.GetProperties of Microsoft.Office.Interop.Excel.Range returns empty array

I want to get a list of properties of Microsoft.Office.Interop.Excel.Range interface using the following code: using Excel = Microsoft.Office.Interop.Excel; PropertyInfo[] info = typeof(Excel.Range).GetProperties(); but the result is an empty…
Roman
  • 13
  • 3
0
votes
1 answer

How to access java properties file

I have a properties file. #My properties file config1=first_config config2=second_config config3=third_config config4=fourth_config I have a class that loads the properties file in a small Java app. It works fine, specifically when I try to access…
aCarella
  • 2,369
  • 11
  • 52
  • 85
0
votes
1 answer

IEnumerable.GetProperties()

I have class Foo, which derived from interface IFoo and IEnumerable public class Foo:IFoo,IEnumerable { public decimal Count {...} ///etc... } How to call GetProperties(), that it's return only public properties of IEnumerable (not IFoo or…
Anton Kandybo
  • 3,678
  • 4
  • 23
  • 31
0
votes
1 answer

getPropertyValue doesn't wok in IE9?

I want to use transition and transform to make a slider. I use the getPropertyValue to check the current slide. It works fine in Chrome, but in the IE9 it shows an error: TypeError: Cannot read property '0' of null (I marked the line with **) the…
0
votes
0 answers

Microsoft.Office.Interop.Excel - Reflection GetProperties

aI am trying to use reflection to retrieve the properties of a Microsoft.Office.Interop.Excel.Series object. The code executes with no errors, but only a partial listing of the properties is returned (when compared to the properties listed in the…
0
votes
1 answer

Access a component of a custom control

I have a custom Control which I'll call ccViewTemplate with this code in it:
Bill F
  • 2,057
  • 3
  • 18
  • 39
0
votes
1 answer

Type.GetProperties() not working

So I'm trying to retrieve the list of properties generated from a Strings.resx resource. A Strings class is auto-generated from that, and I'm simply trying to get a list of those property names. Below is some example code of what doesn't work. //…
Ultratrunks
  • 2,464
  • 5
  • 28
  • 48