Click here to Skip to main content
15,913,055 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to get the correct code Pin
Scott Dorman25-May-08 4:22
professionalScott Dorman25-May-08 4:22 
GeneralRe: how to get the correct code Pin
Laddie25-May-08 4:30
Laddie25-May-08 4:30 
AnswerRe: how to get the correct code Pin
angels77725-May-08 3:09
angels77725-May-08 3:09 
GeneralRe: how to get the correct code Pin
Scott Dorman25-May-08 3:28
professionalScott Dorman25-May-08 3:28 
GeneralRe: how to get the correct code Pin
angels77725-May-08 4:03
angels77725-May-08 4:03 
GeneralRe: how to get the correct code Pin
Scott Dorman25-May-08 4:21
professionalScott Dorman25-May-08 4:21 
AnswerRe: how to get the correct code Pin
angels77725-May-08 4:20
angels77725-May-08 4:20 
GeneralRe: how to get the correct code Pin
Scott Dorman25-May-08 4:26
professionalScott Dorman25-May-08 4:26 
First, please use the "code block" tags (<pre>) with code blocks like that to preserve the formatting.

Second, see my other resposne. You want your code to look something like this:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
 
namespace DataAccessLayer
{
    public class DataAccess
    {
        private string connectionString;
 
        public DataAccess()
        {
            this.connectionString = ConfigurationManager.AppSettings["connectionString"];
 
            // you could also use the following, which is the "more correct" way
            // this.connectionString = ConfigurationManager.ConnectionStrings["connectionString"];
        }
 
        public string ConnectionString
        {
            get
            {
                return this.connectionString;
            }
        }
    }
}


Scott.

—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

[Forum Guidelines] [Articles] [Blog]

GeneralRe: how to get the correct code Pin
angels77725-May-08 5:00
angels77725-May-08 5:00 
GeneralRe: how to get the correct code Pin
Scott Dorman25-May-08 6:28
professionalScott Dorman25-May-08 6:28 
Questionwhich website??? pliz help me Pin
mbaz25-May-08 2:34
mbaz25-May-08 2:34 
AnswerRe: which website??? pliz help me Pin
Bert delaVega25-May-08 9:00
Bert delaVega25-May-08 9:00 
Questionlock needed in this scenario? Pin
George_George25-May-08 2:24
George_George25-May-08 2:24 
AnswerRe: lock needed in this scenario? Pin
Anthony Mushrow25-May-08 3:11
professionalAnthony Mushrow25-May-08 3:11 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 17:31
George_George25-May-08 17:31 
GeneralRe: lock needed in this scenario? Pin
Anthony Mushrow25-May-08 21:07
professionalAnthony Mushrow25-May-08 21:07 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 21:28
George_George25-May-08 21:28 
AnswerRe: lock needed in this scenario? Pin
Luc Pattyn25-May-08 4:19
sitebuilderLuc Pattyn25-May-08 4:19 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 18:53
George_George25-May-08 18:53 
GeneralRe: lock needed in this scenario? Pin
Luc Pattyn25-May-08 21:06
sitebuilderLuc Pattyn25-May-08 21:06 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 21:27
George_George25-May-08 21:27 
GeneralRe: lock needed in this scenario? Pin
Luc Pattyn26-May-08 2:52
sitebuilderLuc Pattyn26-May-08 2:52 
GeneralRe: lock needed in this scenario? Pin
George_George26-May-08 15:39
George_George26-May-08 15:39 
Questiondoing validation in other file.cs Pin
angels77725-May-08 1:58
angels77725-May-08 1:58 
AnswerRe: doing validation in other file.cs Pin
Christian Graus25-May-08 2:03
protectorChristian Graus25-May-08 2:03 

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.