今天在印度的网站上发现一个很经典的代码,也对比了国内的网站的答案
发现了,国内的技术含量真是太低了,心情也不好了
为什么印度人能做到那么有技术性,我们为什么不能,还是学习的不够啊,所以果断的拿到国内来,和大家分享
希望在国内,我们IT业能有新的蓝天
1.app.config国内大多是把它当作xml处理
(哥们,你那叫修改,而不是在run time的环境中,鄙视)
2.简要说明下,印度人的代码
2.1 You can change App.config file runtime using C# in your windows application
你可以改变app.config文件当你的windows form运行的时候
下面是代码
// Open App.Config of executable
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
// Add an Application Setting.
config.AppSettings.Settings.Remove("LastDateFeesChecked");
config.AppSettings.Settings.Add("LastDateFeesChecked", DateTime.Now.ToShortDateString());
// Save the configuration file.
config.Save(ConfigurationSaveMode.Modified);
// Force a reload of a changed section.
ConfigurationManager.RefreshSection("appSettings");
不解释了,有注释
很好的代码,希望对大家有用
分享到:
相关推荐
profile.setPreference("modifyheaders.config.active", true); profile.setPreference("modifyheaders.config.alwaysOn", true); FirefoxBinary firefoxBinary = new FirefoxBinary(); //firefoxBinary....
Using the C++ Standard Template Libraries is a contemporary treatment that teaches the generic programming capabilities that the C++ 14 Standard Library provides. In this book, author Ivor Horton ...
Output registers encode semantic information in their name. Need to lookup a table built at decl time.Input registers are referred to by their semantic name rather than by index. Use the mapping build...
modify_config.zip
ASP.NET 4高级程序设计Many of the examples in this book use SQL Server. In most cases, it is assumed that you are using SQL Server Express. However, you can modify the connection string in the ...
Try This: Run the API Demos Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . 41 Android Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
With a variety of example apps that demonstrate key hardware communication concepts, this book will help you become an Android hardware interfacing pro in no time. Table of Contents Chapter 1. ...
- A printer to run the printer test, set-up as the default printer in Windows. - A CD ROM + 1 Music CD or Data CD to run the CD test. - A CD-RW to run the CD burn test. - A network connection and the ...
In this first book to provide a hands-on approach to refactoring in C# and ASP.NET, you’ll discover to apply refactoring techniques to manage and modify your code. Plus, you’ll learn how to build a...
中国人猛戳这里 About VirtualApp is an open platform for Android that allows you to ...You are not allowed to modify the app module and put to the software market, if you do that, The consequences you kno
11. Add additional tools using control.bat 12. Review & update Matrix 13. Run MRP naming 14. Edit drills 15. Edit Order Spec 16. Run traveler 17. Compare Spec. 18. Update BOM 19. Check in Job ...
By the end of the first chapter, you'll be able to decompose a sound into its harmonics, modify the harmonics, and generate new sounds. Subsequent chapters follow a logical progression that develops ...
我们在做游戏资源或者其他资源的时候,经常要用到加密。否则游戏资源包被破解之后游戏资源就公开可见了,所以需要用到这款MD5加密软件,非常的好用
1.1.3 Using the Singleton Pattern in Unity...........................5 1.1.4 Inheritance.................................................6 1.1.5 Where to Now?.............................................
Modify the binary at 0 or 0x3000 binset.exe -f app.bin -s 0,0xff,0xff,0xff,0xff binset.exe -f app.bin -s 0x3000,0x55,0xaa,1,2,3,4 Modify and delete backups binset.exe -f app.bin -s 0,0xff,0xff,0...
Programmers use design patterns to organize objects in programs, making them easier to write and modify. C# Design Patterns: A Tutorial is a practical guide to writing C# programs using the most ...
When developing (or packaging), note that this app needs to be signed with the same key as the main Termux app in order to have the permission to modify the required font or color files. License ...
Or you can create scripts, encrypt them and then decrypt them at run-time so that only a number of limited people can script for your program. Allowing the end-user to modify your program, gives your...
[精通正则表达式(第三版)].(美)佛瑞德.扫描版(modify).pdf 中文版.