Click here to Skip to main content
15,908,776 members
Home / Discussions / C#
   

C#

 
Questionmohth calendar Pin
mariuszfryta28-May-06 9:38
mariuszfryta28-May-06 9:38 
AnswerRe: mohth calendar Pin
FreewareFire28-May-06 11:02
FreewareFire28-May-06 11:02 
GeneralRe: mohth calendar Pin
mariuszfryta28-May-06 22:26
mariuszfryta28-May-06 22:26 
QuestionReading "Image/Picture taken" information from imagefiles on disk Pin
Larantz28-May-06 9:33
Larantz28-May-06 9:33 
AnswerRe: Reading "Image/Picture taken" information from imagefiles on disk Pin
Rei Miyasaka28-May-06 13:24
Rei Miyasaka28-May-06 13:24 
GeneralRe: Reading "Image/Picture taken" information from imagefiles on disk Pin
Larantz28-May-06 22:08
Larantz28-May-06 22:08 
GeneralRe: Reading "Image/Picture taken" information from imagefiles on disk Pin
Rei Miyasaka28-May-06 22:22
Rei Miyasaka28-May-06 22:22 
Questionreading from exe.config file using ConfigurationManager [modified] Pin
shaul zak28-May-06 8:55
shaul zak28-May-06 8:55 
Im trying to read the myapplication.exe.config file using the ConfigurationManager class.

the myapplication.exe.config file looks like that -


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="LogDirectory" value="C:\Documents and Settings\\logs\" />
<add key="LogFileName" value="MYLOG.log" />
</appSettings>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
</configuration>

in the code i defined the configuration file and managed to get the net section by -

System.Configuration.Configuration ConfigurationFile = ConfigurationManager.OpenExeConfiguration(@"C:\Documents and Settings\myapplication.exe.config");

ConfigurationSection netSection = ConfigurationFile.GetSection(@"system.net/mailSettings/smtp");

but how do i get the host and the post ???
thanks

Shaul zak
Software engineer
www.Unipier.co.il


-- modified at 14:57 Sunday 28th May, 2006
AnswerRe: reading from exe.config file using ConfigurationManager [modified] Pin
shaul zak28-May-06 23:57
shaul zak28-May-06 23:57 
Questionrun other programs as mdi at own prog Pin
FreewareFire28-May-06 8:09
FreewareFire28-May-06 8:09 
AnswerRe: run other programs as mdi at own prog Pin
FreewareFire28-May-06 12:02
FreewareFire28-May-06 12:02 
QuestionColor Wheel [modified] Pin
Cerasti28-May-06 7:23
Cerasti28-May-06 7:23 
AnswerRe: Color Wheel [modified] Pin
Robert Rohde28-May-06 11:20
Robert Rohde28-May-06 11:20 
GeneralRe: Color Wheel [modified] Pin
Cerasti29-May-06 4:37
Cerasti29-May-06 4:37 
GeneralRe: Color Wheel [modified] Pin
Cerasti6-Jun-06 6:18
Cerasti6-Jun-06 6:18 
QuestionPassing value from form to an active form Pin
JelleM28-May-06 6:27
JelleM28-May-06 6:27 
AnswerRe: Passing value from form to an active form [modified] Pin
StevenS_Dev28-May-06 7:26
StevenS_Dev28-May-06 7:26 
GeneralRe: Passing value from form to an active form Pin
JelleM28-May-06 7:34
JelleM28-May-06 7:34 
AnswerRe: Passing value from form to an active form [modified] Pin
Alex B. Clarke28-May-06 7:59
Alex B. Clarke28-May-06 7:59 
GeneralRe: Passing value from form to an active form [modified] Pin
JelleM28-May-06 9:31
JelleM28-May-06 9:31 
GeneralRe: Passing value from form to an active form [modified] Pin
Alex B. Clarke28-May-06 10:06
Alex B. Clarke28-May-06 10:06 
GeneralRe: Passing value from form to an active form [modified] Pin
StevenS_Dev28-May-06 14:46
StevenS_Dev28-May-06 14:46 
Questiondelete Pin
kjosh28-May-06 5:55
kjosh28-May-06 5:55 
AnswerRe: delete Pin
WillemM28-May-06 6:54
WillemM28-May-06 6:54 
AnswerRe: delete Pin
JelleM28-May-06 6:54
JelleM28-May-06 6:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.