user582734
user582734

Reputation: 45

app.config file in c# class library

I m having a class library project which is referenced in my windows application project. One of the method of class library returns all the key value pair which is stored in my app.config file, when i m calling this method in my windows project there comes a error as "sequence contains no element". How can i solve this problem?

Upvotes: 2

Views: 599

Answers (1)

slash shogdhe
slash shogdhe

Reputation: 4197

When an application is run, a new application domain is created Several different instantiations of an application can exist on the same machine at the same time, and each has its own application domain

Types loaded into one application domain are distinct from the same type loaded into another application domain, and instances of objects are not directly shared between application domains.

Use of a class library does not cause the creation of a new application domain. Instead, a class library is loaded into the application domain that uses it. For instance, when an application uses a class library, that class library is loaded into the application domain for that application. If an application uses a class library A that itself uses a class library B, then both A and B are loaded into the application domain for the application

Upvotes: 2

Related Questions