Browse the new common features in the. NET Framework 2.0 Type library

Source: Internet
Author: User
Tags ftp mail new set ftp client

Not how to use it when vs2005 beta1 out, now that Beta2 is installed, when looking at the. NET 2.0 type library, it's amazing to find that many of the problems that have been raised in the CSDN community have a direct solution. Shushi wrote some words to make a list of my more concerned about a few pieces of function.

1. Serial operation

Add System.IO.Ports namespace, provide the SerialPort class to realize the function of serial port operation.

In the. Net Framework 1.x, we need to use another component, specifically to do can refer to the connection I posted: http://www.microsoft.com/china/MSDN/library/enterprisedevelopment /softwaredev/code4fun12102003.mspx,

The article mentions the use of three methods to implement, if you need to be able to download the relevant components to apply to their own projects.

2. Compression decompression

The new System.IO.Compression namespace, used to handle commonly used file compression or decompression, has not yet been studied, but looks good. In the. NET Framework 1.x, we are more commonly used ICSharpCode.SharpZipLib.dll, which is a component used in SharpDevelop, download the address: http://www.icsharpcode.net/ Opensource/sharpziplib/download.aspx and one is using the Zip class in the J # Class library, and the relevant content can be seen http://www.microsoft.com/china/msdn/library/ langtool/vcsharp/miszipcompression.mspx;

In addition, I saw fish writing codelib. NET software used Unrar.dll, specifically did not study the usage, should also be to deal with the file compression decompression, the relevant information of the connection address to see http://www.rarlab.com/.

3. Network Processing Enhancements

The new System.Net.NetworkInformation namespace, which contains a bunch of types, has a ping class, not to mention it, to implement the ping command function. In the. Net Framework 1.x, I typically use one of the methods to detect a network:

Http://dotnet.aspx.cc/ShowDetail.aspx?id=VXMGWMHF-OJCC-4RBD-KH6X-RIJQLD17QMFW;

Http://blog.csdn.net/zhzuo/archive/2004/03/21/22024.aspx, and whether the static method using the System.Net.Dns class throws an exception to confirm the computer connection. And it's comprehensive to see that. NET 2.0 provides support for IPV6.


4. Using FTP

See the addition of the FtpWebRequest and ftpwebresponse two classes in System.Net, this time you can use FTP directly, no need to use third-party components. In the. Net Framework 1.x, most need to be done through third-party components, which you can refer to: an FTP Client library in C #: http://www.csharphelp.com/archives/ Archive9.html, there is the Rss bandit used in an FTP component, has been seen on the COM interop, do not know whether the new version is still used this, specific can see HTTP://WWW.RSSBANDIT.ORG/,RSS Bandit is an open-source software that downloads address http://sourceforge.net/projects/rssbandit/.


5. Use of SmtpClient

Support for mail operations is provided in the System.Net.Mail namespace, and classes under the System.Web.Mail namespace are used in the. Net Framework 1.x, but the functionality is weak, and the reference site http:// Www.systemwebmail.com/default.aspx, you can also use the socket to write a, but the mail protocol needs to have a certain understanding.

6. Using multimedia

There are some classes in the System.Media namespace that deal with sounds, but you don't seem to see the components that support video, whether you want to use or call Media Player.


7. Use other new components

In the future development of database-related programs, the most common use may be DataGridView, asp.net and WinForm each one, the purpose is to replace the DataGrid, use the DataGrid can refer to here: http:// Www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp.

Many of the problems with the DataGrid that are often raised in the community using DataGridView can be solved without having to rewrite some classes or third party component classes to achieve In addition, in 2.0 to provide a powerful System.Windows.Forms.WebBrowser control, so that Interop.SHDocVw.dll can quit the lake, hehe. In WindowsForm program development, you can use a new set of strip-type controls that look powerful. ASP.NET2.0 offers more new things.

8. What's new in language

The most wanted is generics, now a new class will automatically add "using System.Collections.Generic;" Instead of "using System.Collections;". Other functions are also very attractive, there are many articles have been introduced, specific understanding can see http://www.microsoft.com/china/msdn/library/langtool/vcsharp/CreElegCodAnymMeth.mspx.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.