473,748 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Properties File in .Net Similar to Java Properties file

Hi All,

Is there any class which provides support file properties file similare to
java Properties?

Basically I looking for reading/writing properties file in C# of format

attrName=Value pair

Thanks in advance
Sachin
Nov 16 '05 #1
2 15647


Sachin wrote:

Is there any class which provides support file properties file similare to
java Properties?

Basically I looking for reading/writing properties file in C# of format

attrName=Value pair


..NET is using XML for such stuff so within the .NET SDK there is support
to store and read application settings from XML configuration files.
If you have a file in a different format perhaps created by some
non-.NET application then you would need to write your own parser or
look around in .NET code repositories on the web.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 16 '05 #2
Sachin wrote:
Hi All,

Is there any class which provides support file properties file similare to
java Properties?

Basically I looking for reading/writing properties file in C# of format

attrName=Value pair


Check the documentation on App.Config and the appSettings section.
Unlike java, a .NET app does not automatically parse your config file.

--
There are 10 kinds of people: those who understand binary and those who
don't.
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
11458
by: Paul | last post by:
Hello, I've been reading up on security in Java Applets and whilst I understand the concept, I can't successfully get my applet to read a file on my local machine. I discovered from http://java.sun.com/sfaq/#read: ----- Sun's appletviewer allows applets to read files that are named on the access control list for reading. The access control list for reading is null by default, in the JDK. You can allow applets to read directories or files...
3
6398
by: Simon Wigzell | last post by:
I recently wrote a program with MS Visual Studio C++, sent it off to the client where it didn't run, after some probing I discover they are on a Mac! My program is a MSF interface that is really only 2 File buttons with corresponding text fields. The actual guts of the program is a C file that accepts 2 file names as arguments and reads from one file, manipulates the string and writes it to another file. Java and C syntax are very similar....
1
4763
by: ¤H | last post by:
Normally we specify the properties for 'java' by the -D option. Is there any alternatives, say reading a property file, rather than manually typing all the properties one by one. I searched through the SDK documentation but there wasnt anything mentioned. I suspect there should be some ways. Any hints appreciated. --- Posted via news://freenews.netfront.net
1
4947
by: nos | last post by:
I have done some searching to no avail. The docs say that there is a file of logging properties, and I found that, but there is also reference to a "user" level of logging properties, which I cannot find. Also, I tried changing one of the logging properties at the command line, but it didn't seem to work. Example: java -D "java.util.logging.ConsoleHandler.level = ALL" MyApp I don't want to disturb the system level properties list, I...
10
3786
by: Nikita A. Visnevski | last post by:
Hi everyone, I am rather new to Java beans. Just picked up a book last night and started reading about them. I am building an application that allows a user to define objects with dynamic properties. Something similar to a java hash table. One can add new properties at runtime and remove them as well. I have a really fancy third party property inspector available to me that I would very much like to reuse. This inspector uses...
3
3031
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements - also allow them? Adding (and removing) object properties dynamically is an acceptable and common practice in JavaScript, and greatly adds to the power and character of the language. Essentially, an object in JavaScript can be considered to...
10
7366
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a Windows.Forms.UserControl in a COM environment, i.e. I want to host that control in a COM host. So far, so good, I can host it, but I can not reach the parent COM object from the control (Parent property is null :( ). I have stopped the control in the...
7
2605
by: ffmelo | last post by:
I need something like java.util.Properties class... I want to store properties in a text file and to get at runtime. Example in java: text file ------ propertieName1=propertieValue1 propertieName2=propertieValue2 propertieName3=propertieValue3
4
3132
by: Yin99 | last post by:
I programmed JAVA for a while and starting C#, and was experimenting with "Properties". Question I have, is what is the benefit? JAVA does not have the concept of properties, so what is JAVA missing and why is it so great C# has it? Thanks, Yin
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.