Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,



I created cache in web application but i need to create it using c# in console application



here is my code in asp .net


C#
Cache[TextBox1.Text] = Jobs;
             Cache.Insert(TextBox1.Text, Jobs);

            
             Cache.Insert(TextBox1.Text,Jobs, null, DateTime.Now.AddMinutes(10), Cache.NoSlidingExpiration);
             string strCache = "";
             string strKey;
             foreach (DictionaryEntry objItem in Cache)
             {
                 strKey = objItem.Key.ToString();
                 strCache = strKey + " : " + DateTime.Now.ToString() + "Cache Expires at" + ":" + DateTime.Now.AddMinutes(10);




how to write it in console application
Posted
Comments
thursunamy 15-May-14 10:49am    
http://www.codeproject.com/Articles/7670/How-to-use-data-caching-in-a-NET-Windows-Forms-app

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900