I want a thing in caching that a collection variable that can access from anywhere in my application.
i can put data in collection and access them after anywhere in application. the data lost after a time who i set to expiry of data.
someone can show me some code in c# to do this well.
You might want to check out ASP.Net Caching. It allows you to have an application wide caching store (key value collection) which exists as long as your application pool is running.
Also it support expiration of inserted items.