property

Weird VB.NET array-property situation

I have this weird situation. I have these two classes: Public Class Entry End Class Public Class Core End Class One of the properties of the Core class will be an array of Entry objects. How can I declare it? Now, the only way to change (add/remove) this array from outside should be using two functions - AddEntry(Ent As Entry) an...

Custom control with invalid property generates no error

for examle <app:CustomDropDown ID="test" runat="server" InvalidProperty="SOMETHING" /> This does not generate an error. Sometimes i spend hours trying to figure out why my custom controls are displaying no data. Most of the time it turns out they are using and old non existing property and yet no error is generated on execution. What...

Pattern to define key/value properties by using a single String

Hi, As you know, a single String can define many key/value properties. For instance, a query String can be defined as someKey=someValue&anotherKey=anotherValue Now i need to define a pattern in which a single String can define many key/value properties to be stored in a class attribute. But each value can be a String, an Array, A ref...

DefaultValue atttribute is not working with my Auto Property!!

Hello, I have the following Auto Property [DefaultValue(true)] public bool RetrieveAllInfo { get; set; } when I try to use it inside the code i find the default false for is false I assume this is the default value to a bool variable, does anyone have a clue what is wrong!? ...

Cant see UIImageView property inside touchesBegan

I have a really simple app, and I'm stuck just in the beginning. Let me post the code right here. TapStackView.h #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> @interface TapStackView : UIView { //Layers. UIImageView *backgroundImageView; UIImageView *powerOn; } @property (nonatomic, retain) UIImageView *backgro...

variable/property changed event in vb.net

How can I make an event that is raised when a variable or property is changed (or can I just put the code I would put in an event in the Set section of a property? ...

When I try to SET an attribute from another class to another it doesn't allow me to.

Here's the class: namespace TomeOfNewerth_WPF_ { class Hero { public string faction; public string name; public HeroType herotype; public enum HeroType { Agility, Strength, Intelligence } } } Now in another class, just for testing I'm trin...

Passing bytes to "ParentClass" in vb.net

I have a class which get all the bytes from a file, then it splits up the bytes into three parts (a header, index and body) these 3 parts get passed along to 3 classes (called header, body and index) respectively. When the bytes in the three classes gets modified how can I pass these changes back up to the first class (the one that got ...

How can I two-way bind a TextBox to a code-behind property in ASP.NET?

I cannot get any new entries in the textbox:txtMyString to set to the property MyString. What am I missing here? <asp:TextBox ID="txtMyString" Text='<%# MyString %>' runat="server" /> private string myString; protected string MyString { get { return myString; } set { myString = value; } } protected void Page_Load(object sender, EventA...

How to fix namespace problem with autogenerated Master property if MasterType is set

Hello guys, after weeks of having this issue I finally decided to ask for a solution to the following problem: In the .aspx page you can set <%@ MasterType VirtualPath="~/Mastername.master" %> This results in an auto generated property in the .aspx.designer public new Mastername Master { get { return ((Masternamee)(bas...

Using custom dependency properties as DataTrigger in WPF

I have a custom dependency property that I would like to use as a data trigger. Here is the code behind: public static readonly DependencyProperty BioinsulatorScannedProperty = DependencyProperty.Register( "BioinsulatorScanned", typeof(bool), typeof(DisposablesDisplay), new FrameworkPropertyMetadat...

Windows Forms Top Property Bug

I am trying to populate a container with any number of controls that have the same height and width. I allow this container to be shrunk or grown by the user and the container will organize the controls so that it fits the most controls on one row as possible. Here is the code to organize it: int row = 0; int column = 0;...

System.Array GetLength and Length

How do you use the Array.GetLength function in C#? What is the difference between the Length property and the GetLength function? ...

groovy: How to acces to properties file ?

Hi! I have a Groovy application and I want to access programatically to a property defined in message.properteies. As a test I've tried the following: println "capacity.created " + ${message.properties['capacity.created']} But it doesn't work (throws an exception). Any help is welcome Luis ...

What is the Java Equivalent of Python's property()?

I'm new to Java, and I'd like to create some class variables that are dynamically calculated when accessed, as you can do in Python by using the property() method. However, I'm not really sure how to describe this, so Googling shows me lots about the Java "Property" class, but this doesn't appear to be the same thing. What is the Java eq...

ShareThis setting properties in callback don't work

I'm using the ShareThis widget. I need to change the url property after the object has been created so I'm using the callback function option. In the callback function, I attempt to change the url property but the email that goes out still contains the old value. Has anyone been able to solve this problem? If so, I would appreciate y...

Are C# auto-implemented static properties thread-safe?

I would like to know if C# automatically implemented properties like "public static T Prop{get;set;}", are thread safe or not. Thanks! ...

WinForms ApplicationSettings, PropertyBinding

Hi, I used to have one project where i had defined all my application settings. In all the different forms I binded controls to those settings and everything worked great. I decided to split the one project into several ones. One of the projects is now shared by all and that project is now hosting the application Settings. The problem i...

Custom widget for StringListProperty in GAE

I am using StringListProperty to store series of steps/tasks. By default StringListProperty is having Textarea widget. Instead i want to have multiple Text input fields each one for each item in the List. Is this something that is possible in GAE (or atleast in Django) Can the same be wrapped into a custom property such as TaskListProp...

C# set accessor accessible to all types in assembly, and get assessor only to derivated types. How to?

This property in a type with no access modifier (thus internal access): class SomeType { private int length; internal int Length { get { return length; } set length = value; } } } allows all types within the assembly of SomeType to use get and set accessors. Problem: how to restrict the access to set to onl...