Click here to Skip to main content
15,916,600 members
Home / Discussions / C#
   

C#

 
AnswerRe: Best way to access a database [modified] Pin
PIEBALDconsult2-May-10 9:35
mvePIEBALDconsult2-May-10 9:35 
AnswerRe: Best way to access a database [modified] PinPopular
Pete O'Hanlon2-May-10 9:52
mvePete O'Hanlon2-May-10 9:52 
GeneralRe: Best way to access a database Pin
PIEBALDconsult2-May-10 9:56
mvePIEBALDconsult2-May-10 9:56 
GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 10:10
mvePete O'Hanlon2-May-10 10:10 
GeneralRe: Best way to access a database Pin
PIEBALDconsult2-May-10 10:29
mvePIEBALDconsult2-May-10 10:29 
GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 10:33
mvePete O'Hanlon2-May-10 10:33 
GeneralRe: Best way to access a database Pin
PIEBALDconsult2-May-10 10:53
mvePIEBALDconsult2-May-10 10:53 
GeneralRe: Best way to access a database Pin
Terence van Schalkwyk2-May-10 20:01
Terence van Schalkwyk2-May-10 20:01 
Ok so this is my class called settings.cs I dont know where I am going wrong but it does not like the code it gives me the following errors:

Error 1 Invalid token '{' in class, struct, or interface member declaration
Error 2 Invalid token '{' in class, struct, or interface member declaration
Error 3 Invalid token '.' in class, struct, or interface member declaration

there is a total of 15 errors any help would be greatly appreciated!


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestApplication
{
    public static class Settings
{
  private static string _connectionString = string.Empty;
  public static ConnectionString
  {
    get
    {
      if (string.IsNullOrEmpty(_connectionString))
        _connectionString = ConnectionManager.ConnectionStrings["connection_string_stored_in_config_file"];
      return _connectionString;
    }
  }
}
}

GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 20:38
mvePete O'Hanlon2-May-10 20:38 
GeneralRe: Best way to access a database Pin
Terence van Schalkwyk2-May-10 20:58
Terence van Schalkwyk2-May-10 20:58 
GeneralRe: Best way to access a database Pin
Pete O'Hanlon2-May-10 21:21
mvePete O'Hanlon2-May-10 21:21 
QuestionRe: Best way to access a database [modified] Pin
Terence van Schalkwyk2-May-10 23:37
Terence van Schalkwyk2-May-10 23:37 
AnswerRe: Best way to access a database Pin
Pete O'Hanlon3-May-10 2:33
mvePete O'Hanlon3-May-10 2:33 
Questionimage protect Pin
hameduser2-May-10 4:40
hameduser2-May-10 4:40 
AnswerRe: image protect Pin
Dave Kreskowiak2-May-10 5:51
mveDave Kreskowiak2-May-10 5:51 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 14:14
protectorAspDotNetDev2-May-10 14:14 
GeneralRe: image protect Pin
loyal ginger2-May-10 14:32
loyal ginger2-May-10 14:32 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 19:15
protectorAspDotNetDev2-May-10 19:15 
GeneralRe: image protect Pin
loyal ginger3-May-10 17:38
loyal ginger3-May-10 17:38 
GeneralRe: image protect Pin
Dave Kreskowiak2-May-10 14:38
mveDave Kreskowiak2-May-10 14:38 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 19:20
protectorAspDotNetDev2-May-10 19:20 
GeneralRe: image protect Pin
Anthony Mushrow2-May-10 15:37
professionalAnthony Mushrow2-May-10 15:37 
GeneralRe: image protect Pin
AspDotNetDev2-May-10 19:19
protectorAspDotNetDev2-May-10 19:19 
QuestionDropDownList inside GridView Pin
msomar1-May-10 21:57
msomar1-May-10 21:57 
AnswerRe: DropDownList inside GridView Pin
Abhinav S1-May-10 22:42
Abhinav S1-May-10 22:42 

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.