This might be a bit of an anti-pattern, but it is possible for a property on a C# class to accept multiple values?
For example, say I have an Public int property and I always want it to return an int, but I would like to be able to have the property set by assigning a decimal, an integer or some other data type. So my question is if it ...
I'm looking for a resource to list all the built-in properties defined in an MSBuild project file. Specifically I'm using a Team Build project file, but from what I understand they are one in the same (correct me if I'm wrong).
I already know about the reserved properties: http://msdn.microsoft.com/en-us/library/ms164309.aspx
But I've ...
I'm creating an instance of a viewController, and then trying to set the text on of it's properties, a UILabel.
BoyController *boyViewController = [[BoyController alloc] initWithNibName:@"BoyView" bundle:nil];
NSString *newText = [astrology getSignWithMonth:month withDay:day];
boyViewController.sign.text = newText;
NSLo...
Hi,Can someone point me to some sort of documentation that has a complete list of the properties and their value types that Binding class offers.
<Image Source={Binding ......}/>
Basically a list of all the properties that go after the Binding keyword.
Many Thanks
...
I have a very simple properties file test I am trying to get working: (the following is TestProperties.java)
package com.example.test;
import java.util.ResourceBundle;
public class TestProperties {
public static void main(String[] args) {
ResourceBundle myResources =
ResourceBundle.getBundle("TestProperties");
...
So what I'm trying to do is call a single propertyWasSet() function when any property within a C# class is set (conversely, propertyWasGot() when it is get). I would also like to know which property's 'get' was invoked.
I would like to maintain a dictonary of properties that are 'set', and check upon the 'get' action if they have been s...
Hi can anyone help here? I am currently learning VB.net but for a project I need to create and array and pass it using a property. The data to be passed will be a train's destination, the time its due and the expected time of the train. I was wondering if someone could simplly explain how to first produce an array and then show how to pa...
Below is a Class I created to track the current Person in my glorified Data Entry and retrieval app. Once they select a person it calls the constrtuctor which then calls the database to fill in all the rest of the info. Also, throughout the program they will be able to change the various fields.
With this in mind do I have the below...
Hi all,
I would like in a maven2 POM to define a property with a different value if I am packaging a SNAPSHOT or a RELEASE (a non SNAPSHOT) of my project.
I know that I can write a simple Mojo plugin that defines the property regarding the project.version (contains SNAPSHOT or not), but I cannot imagine that in the Maven's hell of exis...
On normal JVMs you can use META-INF/MANIFEST.MF to declare application properties, in J2ME you can use the .jad-Files but what can you do on Android?
I need a way to declare properties which I can access using System.getProperties() on Android. It would be best if I could use the same file format as MANIFEST.MF-like property files use.
...
Hi everyone,
I'm trying to load a properties file without using the actual path of the file. I've already done that on some other simple apps using:
InputStream inputStream = ClassLoader.getSystemResourceAsStream(PROPERTIES_FILE);
props.load(inputStream);
But this time it doesn't work. The inputStream is null for some reason. PROPERT...
Is there some internal difference between the C# syntactic sugar way of making properties:
public string FirstName { get; set; }
and just making public variables like this:
public string LastName;
I assume the first way is preferred and the second to be avoided. However, I often see this type of readonly property being used which i...
It's hard to explain my problem so give me a break if it's not very clear.
I have some ten properties that can be edited in the view. Most of them are booleans. These properties configure a test environment (like one property can be configured to show the solution).
Now, the problem is that some properties can't be set to true if other...
In C# I can do this to expose a property via WCF
[ServiceContractAttribute()]
public interface IFoo
{
int Length
{
[OperationContract()] get;
[OperationContract()] set;
}
}
I have to do it that way since OperationContract decorates a method but not a property. I'm working with a legacy interface that I can't easily chan...
I've got a BizTalk solution where I added a schema, and promoted a field
- this added the default PropertySchema.xsd with the element in
A bit later, added another schema, but when I try and promote a couple of fields, but when I select Show Promotions, I end up mapping the new field to one of the existing fields in the PropertySchema
...
My application uses JDBC database drivers. I load these from a jar file, db2jcc.jar in the case of DB2 which I'm currently working with. With this jar in the classpath, everything is fine, but I have a requirement to find the jar from a property in the application's config file instead - for example,
database.driver=/opt/IBM/db2/V9.5/j...
OK, I'm stumped.
I have a Java tree that looks like a fairly typical Eclipse Java build:
myproject
src
com
example
test
// Java files in com.example.test here
bin
com
example
test
// Compiled class files will go here
Now I have a MyClass.properties file in myproject/src/com/...
I have a .jar file I'm putting together. I want to create a really really simple .properties file with configurable things like the user's name & other stuff, so that they can hand-edit rather than my having to include a GUI editor.
What I'd like to do is to be able to search, in this order:
a specified properties file (args[0])
MyApp...
I have a base class like this:
public class BaseModalCommand
{
protected object m_commandArgument;
protected int m_commandID;
protected int m_enableUIFlags;
public virtual void OnIdle()
{
}
public virtual void OnResume()
{
}
public virtual void OnStart(int commandID, object argument)
{
...
I'm trying to derive from List and selectively turn the IsReadOnly property on and off. I was hoping that the Add/Remove/[] functions would honor this property, but they don't.
What's the right way of doing this?
My derived class has some additional properties, so I can't unfortunately just wrap the list in ReadOnlyCollection.
...