I know this may be a noob question, but it's bugging the heck out of me.
Let's say I have a user control that I reference in my .aspx page:
<uc:somecontrol runat="server" id="uc1" property1="red" />
how do I make it so when in VS05 the intellisense will show options like "red", "green", "blue" for property1? Similar to how when you w...
I need to serialise a javabean (with arbitrary nested beans) to plain text, and then later restore as an Object graph.
For the purposes of this question I am not interested in XML, JSON, etc. but rather name/value pairs.
The Spring DataBinder is great for turning a list of name/value pairs into a real Object. For example we can supply:...
I thought about creating my own, but there are many details to consider to make it 100% compatible with Java .properties files, so I'm asking first.
...
In our C# code, we have a class called Project. Our base BusinessObject class (that all business objects inherit from) defines a property:
public Project Project { get; set; }
This is normally not a problem as long as we stay within the C# codebase. However, these business object classes are exposed in web services over the wire. Some...
I just ran across this error message while working in C#
A property or indexer may not be passed as an out or ref parameter
I known what caused this and did the quick solution of creating a local variable of the correct type, calling the function with it as the out/ref parameter and then assigning it back to the property:
RefFn(re...
I have a class.
Public Class Foo
Private _Name As String
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property
Private _Age As String
Public Property Age() As String
Get
Retur...
I have a class as follows
Public Class Foo
Private _Name As String
<ShowInDisplay()> _
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property
Private _Age As String
Public Property Age() As St...
I migrated an SVN server today and ran into an issue. I have a repo that has an svn:externals property on a trunk subfolder. This folder has been branched a bunch of times and now this svn:externals reference needs updated on every single branch to refer to the new server.
Is there an easy way to update all of these properties?
I'm not...
I haven't gotten my head wrapped around Spring yet, so correct me if this question doesn't make sense...
I have a PropertyPlaceholderConfigurer
<bean id="rdbmPropertiesPlacholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" lazy-init="false">
<property name="location" value="classpath:/properties/...
Is there a possibility to checkout from a repo based on the properties of a svn-versioned file? That would be a special kind of sparse checkout. For example to checkout only files with "svn:corelib" == "yes".
Or is the only chance just to checkout the whole repo and to delete the unwanted files later? For example with a script that pull...
Folks,
I'd like to create some T4 templates for generating class files (about 7 per table) from a database to support our in-house ORM (don't ask - long story and historical reasons.....)
What I'd really love to do is have a property on my main TT template to visually pick server, database and table for which to create the files (somet...
I am trying to set the MaxLength property on a RichTextBox but it does not seem to work.
Any ideas what might be happening?
...
I find C#'s Attributes, Python's Properties too a really nice idea, and I guess their direct ancestor might have come from Java's Annotations, but I'm curious as to where this concept originally came from, anyone has any clues?
...
Is it possible to do something like this?
class A
{
public virtual string prop
{
get
{
return "A";
}
}
}
class B: A
{
private string X;
public override string prop
{
get
{
return X;
}
set
{
X = value;
}
...
I have this big polymorphic object hierarchy, and I want to expose these objects to another language using primitive types. I'm thinking my base object will have a dictionary of properties (C++), and each sublcass down the hierarchy will add properties or modify properties, and then when i forward to the other language, i don't need any...
I've attempted to observe the (readonly) visibileViewController property of a UINavigationController with no success. I was able to successfully observe a readwrite property I defined myself for testing purposes on another class.
Is it possible to observer readonly attributes?
...
Here's the scenario...
if (entry.Properties["something"].Value != null)
attribs.something = entry.Properties["something"].Value.ToString();
While effective and working correctly, this looks ugly to me. If I don't check for a null before performing the ToString() then it throws an exception if the property was null. Is there a be...
Lately, I've come across a lot of Java code that relies on "properties files" for configuration. But instead of plain old string literals, the code uses constants (static final Strings) to retrieve the property values .
I find this extra level of indirection annoying because I need to perform TWO lookups in EITHER direction. If I star...
Hello honorable forum,
I'm building a ResourceBundle from a file, this bundle holds < String, String> values.
InputStream in = getClass().getResourceAsStream("SQL.properties");
properties = new PropertyResourceBundle(in);
in.close();
I would like to add/replace on this bundle some properties that I'm passing from the command line usi...
In C# I can have a base class with a property containing just a getter. Subclasses can then override the property and give it both a getter and a setter. This doesn't seem possible in VB.NET with properties since the property statement itself must describe whether it is ReadOnly or not.
In my example below, it doesn't let me make the ...