How to Add a Configuration File to your Windows Forms application कैसे अपनी विण्डोज़ को आवेदन फार्मों के लिए एक विन्यास फाइल जोड़ें
When you are creating a new Windows Forms application, it isn't immediately obvious how to get a configuration file for your application. जब आप एक नया Windows Forms अनुप्रयोग पैदा कर रहे हैं, यह स्पष्ट नहीं है तुरंत कैसे आपके आवेदन के लिए एक विन्यास फाइल को पाने के लिए. Your application configuration file is supposed to be called executablename.exe.config, and should be in the same directory as your application in order for the .NET framework to automatically use it. आपके आवेदन की विन्यास फाइल को executablename.exe.config नाम होना चाहिए, और है. NET Framework के लिए आदेश में अपने आवेदन के रूप में एक ही निर्देशिका में स्वचालित रूप से इसे इस्तेमाल करना चाहिए.
But when you create the configuration file in the \bin\debug directory, it gets overwritten immediately when you do a new build. लेकिन जब तुम बिन \ में विन्यास फाइल \ डिबग निर्देशिका बनाने के लिए, यह तत्काल अधिलेखित हो जाता है जब आप एक नया निर्माण करना. That's slightly annoying. वह थोड़ा परेशान है.
The proper way to add this file is to add new new configuration file called App.config to your project, which Visual Studio will automatically copy and rename to the same name as your executable's name when you do a build. सही तरीका इस फाइल जोड़ने के लिए नए नए विन्यास अपनी परियोजना है, जो दृश्य स्टूडियो स्वचालित रूप से कॉपी करें और अपने निष्पादन योग्य जब आप एक बनाने के नाम के रूप में एक ही नाम का नाम बदलना होगा App.config को बुलाया फ़ाइल जोड़ें है.
There's a really simple way to do this.. वहाँ एक बहुत आसान तरीका यह करना है .. simply go to the File \ Add New Item menu, or hit Ctrl+Shift+A बस फाइल जाना \ नई मेनू आइटम, या हिट Ctrl + Shift जोड़ें A + 
You'll notice that it's already set to App.config for you. तुम नोटिस हूँ कि यह पहले से ही आप के लिए App.config के लिए निर्धारित है. Just hit the Open button. बस खोलें बटन मारा.
If you look in the Solution Explorer, you will see that the config file is in your project: अगर आप समाधान एक्सप्लोरर में देखो, आप देखेंगे कि आपके परियोजना config फाइल में है:

Now build your application, and take a look in the \bin\debug\ folder. अब आपके आवेदन का निर्माण, और बिन \ में देखने \ डिबग \ फ़ोल्डर. You'll see that the configuration file has automatically been generated and named correctly for your executable: आप देखेंगे कि विन्यास फाइल स्वतः जनित है और अपने निष्पादन के लिए सही नाम दिया गया है:

If you change the name of the outputted file, Visual Studio is smart enough to generate the new filename correctly. यदि आप outputted फ़ाइल का नाम बदलने के लिए, दृश्य स्टूडियो काफी चतुर को नए फ़ाइल नाम सही ढंग से उत्पन्न है.
Enjoy Configuring! विन्यस्त आनंद लीजिए!

Daily Email Updates दैनिक ईमेल अपडेट
You can get our how-to articles in your inbox each day for free. आप अपने इनबॉक्स में हमारे कैसे लेख को मुफ्त के लिए प्रत्येक दिन प्राप्त कर सकते हैं. Just enter your name and email below: बस नीचे अपना नाम और ईमेल दर्ज करें:



thank you very much really helpful , thanks a lot बहुत बहुत धन्यवाद वास्तव में उपयोगी, बहुत बहुत धन्यवाद