How do I set CultureInfo.CurrentCulture from an App.Config file?

I don’t know a built-in way to set it from App.config, but you could just define a key in your App.config like this <configuration> <appSettings> <add key=”DefaultCulture” value=”pt-BR” /> </appSettings> </configuration> and in your application read that value and set the culture CultureInfo culture = new CultureInfo(ConfigurationManager.AppSettings[“DefaultCulture”]); Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; Also, as … Read more

Custom app.config Config Section Handler

First you add a property in the class that extends Section: [ConfigurationProperty(“pages”, IsDefaultCollection = false)] [ConfigurationCollection(typeof(PageCollection), AddItemName = “add”)] public PageCollection Pages { get { return (PageCollection) this[“pages”]; } } Then you need to make a PageCollection class. All the examples I’ve seen are pretty much identical so just copy this one and rename “NamedService” … Read more

Deploying and Configuring ODP.NET to work without installation with Entity Framework

This answer summarizes (hopefully) all the steps required, many of which documented in various places online and might save someone hours of Googling. A. How to deploy and configure Oracle.DataAccess.Client. A.1. Download ODAC112030Xcopy_64bit.zip or ODAC112030Xcopy_32bit.zip. A.1.1. Extract the content of the following folders within the zip file into your application/host’s bin/setup folder: A.1.1.1. instantclient_11_2 A.1.1.2. … Read more