property

Serialization of a derived class that hides a base property

I have a class like this MyClass : BaseClass string new FirstName When I try to serialize this class I get the following error message Member SQLClientAdapter.Columns of type hides base class member Adapter.Columns of type ...Use XmlElementAttribute or XmlAttributeAttribute to specify a new name. The recomendation did not work. ...

how to add UITableViewCellAccessoryCheckmark in the middle of the cell in iphone?

Hi, In my iPhone application I have used (UITableViewCellAccessoryCheckmark) to add the checkmarks in the cells, - it is added to the cell at the right side of the cell. I want the checkmarks to display in the middle of the cell and after that a string should display. So that the user can set the cell item as checked or unchecked. Ple...

Moq: Mocking a call to an object with a property of type List

I am learning Moq, and I would like to mock an interface ISecureAsset that has a property Contexts which returns a list of SecurityContexts. I am testing a method on another class that accesses the Contexts property for authorization. public interface ISecureAsset { List<SecurityContext> Contexts { get; set; } } How can I do this ...

compare value property

how can I compare value property of item to datatable column called Value? Please help me with the syntax if ((String)item.Value.IndexOf((string)results("value") Stringcomparison.CurrentCultureIgnoreCase) > -1) { returnItems.Add(item); } ...

Shorten this reflection property name helper method?

Hi, I think the title says it all. I want a static helper method to remove magic strings. Of course, I could pack the property method inside the TestContainer, which would remove the need to provide the TestContainer as argument. This is done nicely here. But I would like to have the helper method in one static class, in case I later d...

.NET 3.5: What is the "ValidatorCollection.IsSynchronized" Property "synchronized" to?

Hi, I understand that in .NET 3.5 the ValidatorCollection.IsSynchronized property return a Boolean telling me if it is synchronized or not. However, I'm having a hard time understand what is it synchronizing with or to? The MSDN manual simply says: Gets a value that indicates whether the ValidatorCollection collection is synchro...

Using Property to get array element in C#

Hello everyone. Is there a way to get a specific element (based in index) from a string array using Property. I prefer using public property in place of making the string array public. I am working on C#.NET 2.0 Regards ...

Create Property in ASP.Net Control to C# and ASPX

Hello, I am trying to create a custom property in a extended control, so that it can be acessed in both ASPX and C#. The problem wasn't actually creating it... because i managed to do it, by applying the following code: public static class Icon { public static string activityMonitor = "activityMonitor.png"; public static string...

GUI tool for configuring Java property files and XML files

Hi, This is more of a question about tools that are out there instead of a programming question on one particular stuff. So apologies in advance if the question does not belong here. I have an application that I want to develop a GUI configuration tool for. At the moment config files for the application are found in a couple of directo...

How do I add/update a property inside an MSI from the command-line?

I have an MSI installer in which I need to add or modify a short text property from the command-line. This has to be done after the installer is built; I cannot modify the process that produces the installer in the first place. It also has to be executed headless from a script. When I say "property," it could be an MSI property, a val...

How can I add a calculated property to a Maven project using a plugin?

I have written a Maven plugin to grab the machine IP address and would like to be able to create a property so that the IP address gets filtered into a file (via ${ipaddress}) when archetype generation happens. I have not been able to find how to do this. Does anyone know? ...

How to assign On Page Property on another page in ASP.NET

Hi All, I have a page with name Default.aspx, on Default.aspx I have Property protected string pageNo = string.Empty; public string PageNo { get { return pageNo; } set { pageNo = value; } } and second page is myPage.aspx have the similar property. Now I want to access the Default.aspx page pro...

Reading an xml value into a property for Wix

In my application installer, I want to read credentials for logging into a database from an xml file. Is there any way that I can do this. If I had to use custom actions, how would I assign the return value into the property? ...

How to set custom property as XAML value?

I have this library with custom Color properties. I wanna be able to use these properties in XAML like this: <Style TargetType="{x:Type eg:MyWindow}"> <Setter Property="Background"> <Setter.Value> <SolidColorBrush Color="CustomClass.CustomColorProperty"/> </Setter.Value> </Sett...

hibernate property formula how to get more than 1 row?

In the hibernate mapping file I use property formula to get any value. <property name="price" type="double" formula="(select SUM(amount) ...) /> But it allows to get only 1 row. How can I get lisf of rows? I understand that "property" is not suitable, but it's impossible to add formula to set or list. Of course I just want to get va...

Dynamically set the property name of a C# anonymous type

Is there any way to dynamically set the property name of an anonymous type? Normally we'd do like this: var anon = new { name = "Kayes" }; Now I'd like to set the name (or identifier) of the property dynamically, so that this name can come from an XML file or a database. ...

C# Property Grid Question

I am writing an application which is going to allows users to change the properties of a text box or label and these controls are user controls. Would it be easiest to create a separate class for each user control which implements the properties I want them to be able to change and then bind those back to the user control? Or is there ...

How can you bind an Indexed property to a control in WPF

Given an instance of the class ThisClassShouldBeTheDataContext as the Datacontext for the view class ThisClassShouldBeTheDataContext { public Contacts Contacts {get;set;} } class Contacts { public IEnumerable<Person> Persons {get;set;} public Person this[string Name] { get { var p = from i in Persons where i.Name...

C# Attach Property Control base class

I would like to know how to add a property from one of my user controls to the base controls property list. Is this possible? So what I am doing is this: private static List<LabelType> ConvertControlCollectionToList(Control customContainer) { LabelTypeList.LabelProps.Clear(); foreach (Control c in customContainer....

C#: Problem calling method inside a string property setter

I have a string property that defines a filename for an xml file. When the user inputs this filename into the property, I have the setter calling a parseXml() function immediatly after setting 'fileName = value' to populate a dataTable with the data from the XML file so it displays in the designer. For some reason, when I have this fun...