Click here to Skip to main content
15,886,110 members
Home / Discussions / C#
   

C#

 
AnswerRe: image gets distorted after resizing Pin
Guffa18-Apr-06 21:38
Guffa18-Apr-06 21:38 
QuestionSQL SERVER EXPRESS or Professional Pin
emran83418-Apr-06 14:20
emran83418-Apr-06 14:20 
AnswerRe: SQL SERVER EXPRESS or Professional Pin
Paul Conrad18-Apr-06 17:43
professionalPaul Conrad18-Apr-06 17:43 
AnswerRe: SQL SERVER EXPRESS or Professional Pin
LongRange.Shooter18-Apr-06 17:50
LongRange.Shooter18-Apr-06 17:50 
Questionfraction.... Pin
KORCARI18-Apr-06 13:03
KORCARI18-Apr-06 13:03 
QuestionIntuit's QuickBooks SDK Pin
Michael A. Barnhart18-Apr-06 12:49
Michael A. Barnhart18-Apr-06 12:49 
QuestionSQL server dynamic connection Pin
namiiiii18-Apr-06 11:54
namiiiii18-Apr-06 11:54 
AnswerRe: SQL server dynamic connection Pin
LongRange.Shooter18-Apr-06 18:13
LongRange.Shooter18-Apr-06 18:13 
Here is one possible approach:

myapp.exe.config
<br />
<add key="ServerLocation", value=@"...path ..."><br />

here is my code snippet
[Serializable]
public class Servers:List<ServerData>
{}
[Serializable]
public class ServerData
{
   string name;
   string connection;
   public string Name { get; set; }
   public string Connection { get; set; }
}

public class myapp
{
  ...
     string location = { depends on framework version as to how you
                         get your configuration setting  }

  ...
     FileStream stream = new FileStream( location, FileMode.Open );
     XmlSerializer ser = new XmlSerializer ( typeof( Servers ) );
     Servers serverList = ser.Deserialize( stream );
     foreach ( ServerData connectionString in serverList )
     {
           myListBox.Items.Add ( connectionString.Name );
     }


That should get you started.

-- modified at 0:15 Wednesday 19th April, 2006
GeneralRe: SQL server dynamic connection Pin
namiiiii18-Apr-06 20:49
namiiiii18-Apr-06 20:49 
GeneralRe: SQL server dynamic connection Pin
LongRange.Shooter19-Apr-06 2:36
LongRange.Shooter19-Apr-06 2:36 
GeneralRe: SQL server dynamic connection Pin
namiiiii19-Apr-06 8:56
namiiiii19-Apr-06 8:56 
GeneralRe: SQL server dynamic connection Pin
LongRange.Shooter20-Apr-06 6:51
LongRange.Shooter20-Apr-06 6:51 
Questioncant add a refference to the directx libreries Pin
yossi198118-Apr-06 11:48
yossi198118-Apr-06 11:48 
AnswerRe: cant add a refference to the directx libreries Pin
LongRange.Shooter19-Apr-06 2:56
LongRange.Shooter19-Apr-06 2:56 
QuestionProcessing Registered Windows Messages Pin
Steve Harding18-Apr-06 11:24
Steve Harding18-Apr-06 11:24 
QuestionCasting Problem Pin
danchester18-Apr-06 9:47
danchester18-Apr-06 9:47 
AnswerRe: Casting Problem Pin
Guffa18-Apr-06 9:57
Guffa18-Apr-06 9:57 
Question"Value does not fall within the expected range" Pin
ahchoo18-Apr-06 7:10
ahchoo18-Apr-06 7:10 
AnswerRe: "Value does not fall within the expected range" Pin
LongRange.Shooter18-Apr-06 11:17
LongRange.Shooter18-Apr-06 11:17 
QuestionMessage="Value does not fall within the expected range." Pin
ahchoo18-Apr-06 7:07
ahchoo18-Apr-06 7:07 
AnswerRe: Message="Value does not fall within the expected range." Pin
Judah Gabriel Himango18-Apr-06 8:01
sponsorJudah Gabriel Himango18-Apr-06 8:01 
AnswerRe: Message="Value does not fall within the expected range." Pin
ahchoo18-Apr-06 8:26
ahchoo18-Apr-06 8:26 
QuestionI have Dundas Gauge for .NET Version 1.6 [for Visual Studio 2005 ] can I use it with .NET 2003 Pin
t4ure4n18-Apr-06 7:02
t4ure4n18-Apr-06 7:02 
AnswerRe: I have Dundas Gauge for .NET Version 1.6 [for Visual Studio 2005 ] can I use it with .NET 2003 Pin
Judah Gabriel Himango18-Apr-06 7:14
sponsorJudah Gabriel Himango18-Apr-06 7:14 
AnswerRe: I have Dundas Gauge for .NET Version 1.6 [for Visual Studio 2005 ] can I use it with .NET 2003 Pin
Troy Marchand19-Apr-06 4:00
sitebuilderTroy Marchand19-Apr-06 4:00 

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.