Tags "properties" Result

Use of properties vs backing-field inside owner class

I love auto-implemented properties in C# but lately there's been this elephant standing in my cubicle and I don't know what to do with him. If I use auto-implemented properties (hereafter "aip") then I no longer have a private backing field to use internally. This is fine because the aip has no side-effects. But what if later on I need to add some

it1352 1 2019-05-10

Delete key and value from a property file?

I want to delete key and value which is stored in a property file. How can i do that???? Solution First load() it using the java.util.Properties API. Properties properties = new Properties(); properties.load(reader); Then you can use the remove() method. properties.remove(key); And finally store() it to the file. properties.store(writer, nu

it1352 1 2019-05-22

Easy creation of properties that support indexing in C#

In C# I find indexed properties extremely useful. For example: var myObj = new MyClass(); myObj[42] = "hello"; Console.WriteLine(myObj[42]); However as far as I know there is no syntactic sugar to support fields that themselves support indexing (please correct me if I am wrong). For example: var myObj = new MyClass(); myObj.field[42] = "hel

it1352 1 2019-05-10

using properties within the properties file

I apologize for the title.. i couldn't find a better way to explain the situation. I use to load properties file using a Property class as described in the URL http://www.exampledepot.com/egs/java.util/Props.html my question is can I use properties within that properties file ? example: test.properties url.main="http://mysite.com" url.ga

it1352 2 2019-05-22

Can Ant properties resolve other properties?

Can Ant properties set via properties file, resolve other properties from properties files? For example, I can do this: <property name="prop1" value="in_test_xml1" /> <property name="prop2" value="${prop1}" /> and prop2 becomes "in_test_xml1". That's good. But in this case, when using an input properties file: prop1=sample_prop pr

it1352 2 2019-05-08

Do properties of properties make sense?

Because this is a question about design I'll start by saying what i have and what i want. I have a design that uses composition. A Cell object holds a Shape and a Background objects (custom made ones for this example). Each of these 2 have their own data that defines them. here is the example in code: class Cell { Shape shape; Background

it1352 1 2019-05-22

orient DB: Adding properties to properties

I am new to orientdb and I am exploring the possibilities. I have a project in mind and I just want to make sure I start in the right direction. To give you a quick idea of what I want to do, think of it like MS Access or Kexi, which means a software that manage database. That explanation will be enough for my question. Some "tables" will be crea

it1352 1 2019-05-15