Questions tagged [getproperty]
84 questions
2
votes
1 answer
Is There a Getproperty or Equivalent Function?
I would like to know if something like this pseudo code:
myVar = "functionName"
call someObject.(myVar evaluation)
which would then be equivalent to:
call someObject.functionName
is possible in VB. I know this is done in some other languages…

Luis
- 1,210
- 2
- 11
- 24
2
votes
1 answer
How to get value of property from object of class at runtime using reflection
I have a class something like below:
Class A : B
{
public A(C entity):base(entity)
{}
}
abstract class B
{
public B(T entity)
{
Entity = entity;
}
public T Entity { get; private set; }
}
Class…

vishal
- 596
- 2
- 12
- 31
2
votes
2 answers
C# assign a value to the object property with parameters
I have an object in vbs:
Msgbox myobject.parametro("parm")
I can use it in C# in this way:
Object test = myobject.GetType().InvokeMember("parametro",
BindingFlags.GetProperty,
null,
myobject,
new object[] { "parm"…

Andrei Untu
- 21
- 1
2
votes
3 answers
How to get the Text property of each form
I have been searching for almost a week now, but I can't seem to solve my simple problem. I want to get all the name and text properties of all the forms in my project.
Here is my code:
using System.Reflection;
Type Myforms = typeof(Form);
foreach…

Mandz
- 195
- 2
- 17
2
votes
1 answer
Getting the attached property "Canvas.Left"
I have the following code:
this.Object.GetType().GetProperty(this.PropertyName).GetValue(this.Object, null);
PropertyName is a string, containing the name of the property I want to get. This works fine for "normal" properties, but I can't get the…

chris6523
- 530
- 2
- 8
- 18
1
vote
1 answer
Why getProperty() returns null?
I have a piece of code defining a property like this:
public static final String DEFINED_KEY = "definedKey";
public static final String DEFINED_PROPERTY = "definedProperty";
// [...]
File f = File.createTempFile("default",…

Laur Ivan
- 4,117
- 3
- 38
- 62
1
vote
0 answers
GetProperty return Null for property that I see in debug
GetProperty method returns null, but I 100% sure that property I try to get exists, because I see it in debug.
I have List of dynamic rows that I get from CSV file. I need to get property value for specific row. To do that I use next code.
Type type…

Иван Комаров
- 9
- 2
1
vote
3 answers
Purpose and usage of "application.path" variable
In the Play! framework source for the main method in Server.java I found these two lines:
File root = new File(System.getProperty("application.path"));
if (System.getProperty("precompiled", "false").equals("true")) {
Play.usePrecompiled =…

user471011
- 7,104
- 17
- 69
- 97
1
vote
4 answers
Using System.getProperty as a condition
Is it OK to use xxx.equals(System.getProperty(key)) as a condition? Or Am I supposed to use the properties for some other purposes?
I have been reading…
user793623
1
vote
3 answers
Calling getProperty on a Properties instance is returning null instead of value
Why is the code below returning null, instead of true?
I can see that the property is being set based on the {TEST=true} output.
Java code:
import java.util.Properties;
public class Test {
public static void main(String[] args) {
…

bobbyrne01
- 6,295
- 19
- 80
- 150
1
vote
1 answer
How to fix system.getenv error while running through maven command?
I am running a project on eclipse through maven and I have set an environment variable on my system for my project to work.
Here is a sample code:
public class StepDefFile {
WebDriver driver = CaptureScreenshot.driver;
public static String…

sshinde
- 13
- 3
1
vote
0 answers
assign a value from a java variable to a jsp variable with getProperty
So for my project, I need to use JSP to make a test. So I am doing all the calculations for the creations of the problems in a separate java file. Then I assign those to a 2d string array in the java file. So I use

Hursh Jha
- 13
- 7
1
vote
2 answers
C# Using reflection to get a an instantiated class given a string variable containing its name
In C# I have multiple instantiations of a class "CItems"(see below). I retrieve a string at run-time of the instantiation I want to use(in this case to call a public method-"addPropertyToList"). I know I have to use reflection but I can't seem to…

K. Dobson
- 11
- 1
1
vote
0 answers
CMake get_property at "generate time" instead of "configure time" for INTERFACE_INCLUDE_DIRECTORIES
I have multiple libraries which utilize the target_include_directories(myLib PUBLIC myLib/inc) command to populate their INTERFACE_INCLUDE_DIRECTORIES property. Now if I build a target which is linked against such a library the…

Otherian
- 11
- 3
1
vote
2 answers
getPropertyValue("backgroundColor") returns an empty string
This is my problem:
var mycss = window.getComputedStyle(myelement);
returns a CSSStyleDeclaration object:
CSSStyleDeclaration {0: "animation-delay",..., backgroundColor: "rgb(0, 0, 0)",...}
Then, I want to get the background color,…

devpelux
- 2,492
- 3
- 18
- 38