What is new in the .net framework 3.5?
2007-12-13 14:39
721 查看
Collections
HashSet<(Of <(T>)>) provides high performance set operations to the .NET Framework. A set is a collection that contains no duplicate elements, and whose elements are in no particular order. For more information, see HashSet Collection Type.Diagnostics
The EventSchemaTraceListener class provides tracing of end-to-end, schema-compliant events. You can use end-to-end tracing for a system that has heterogeneous components that cross thread, AppDomain, process, and computer boundaries. A standardized event schema (see Event Representation for Event Consumers) has been defined to enable tracing across these boundaries. This schema is shared by various tracing technologies, including Windows Vista diagnostics tools such as Event Viewer. The schema also enables the addition of custom, schema-compliant elements.The EventSchemaTraceListener class is tuned for logging performance with implicit support for lock-free tracing.
I/O and Pipes
Pipes provide interprocess communication between any processes running on the same computer, or on any other Windows computer within a network. The .NET Framework provides access to two types of pipes: anonymous pipes and named pipes. For more information about pipes, see Pipes.Garbage Collection
The GCSettings class has a new LatencyMode property that you can use to adjust the time that the garbage collector intrudes in your application. You set this property to one of the values of the new [System.Runtime.GCLatencyMode] enumeration.The GC class has a new Collect(Int32, GCCollectionMode) method overload that you can use to adjust the behavior for a forced garbage collection. For example, you can use this overload to specify that the garbage collector should determine whether the current time is optimal to reclaim objects. This overload takes a value from the new GCCollectionMode enumeration.
Reflection and Reflection Emit in Partial Trust
Assemblies that run with partial trust can now emit code and execute it. Emitted code that calls only public types and methods needs no permissions beyond the permissions demanded by the types and methods that are accessed. The new DynamicMethod(String, Type, array<>[]()[]) constructor makes it easy to emit such code.When emitted code needs to access private data, the new DynamicMethod(String, Type, array<>[]()[], Boolean) constructor allows restricted access. The host must grant ReflectionPermission with the new RestrictedMemberAccess flag to enable this feature, which gives emitted code the ability to access private data only for types and methods in assemblies with equal or lesser trust levels. See Walkthrough: Emitting Code in Partial Trust Scenarios.
For reflection, a host grant of RestrictedMemberAccess similarly allows restricted use of methods that access private properties, call private methods, and so on, but only for target assemblies with equal or lesser trust levels.
Threading
Better Reader/Writer Lock
The new ReaderWriterLockSlim class provides performance that is significantly better than ReaderWriterLock, and comparable with the lock statement (SyncLock in Visual Basic). Transitions between lock states have been simplified to make programming easier and to reduce the chances of deadlocks. The new class supports recursion to simplify migration from lock and from ReaderWriterLock.ThreadPool Performance Enhancements
Throughput for the dispatch of work items and I/O tasks in the managed thread pool is significantly improved. Dispatch is now handled in managed code, without transitions to unmanaged code and with fewer locks. The use of ThreadPool is recommended over application-specific thread pool implementations.Time Zone Improvements
Two new types, DateTimeOffset and TimeZoneInfo, improve support for time zones and make it easier to develop applications that work with dates and times in different time zones. For a discussion of which type to use in particular situations, see Choosing Between DateTime, DateTimeOffset, and TimeZoneInfo.TimeZoneInfo
The new TimeZoneInfo class largely supplants the existing TimeZone class. You can use TimeZoneInfo to retrieve any time zone defined in the registry, rather than just the local time zone and Coordinated Universal Time (UTC). You can also use this class to define custom time zones, to serialize and deserialize custom time zone data, and to convert times between time zones. For more information about developing applications that use the TimeZoneInfo class, see Times and Time Zones.DateTimeOffset
The new DateTimeOffset structure extends the DateTime structure to make working with times across time zones easier. The DateTimeOffset structure stores date and time information as a UTC date and time together with an offset value that indicates how much the time differs from UTC.http://msdn2.microsoft.com/en-us/library/bb332048(VS.90).aspx
相关文章推荐
- What's New in the .NET Framework Version 3.5
- 转:What's New in the .NET Framework 4
- What's New in the .NET Framework Version 4
- What's New in the .NET Framework Version 2.0
- What's New in the .NET Framework 2.0 Beta
- What's New in the .NET Framework 2.0 Beta
- What's New in the .NET Framework 2.0 Beta
- [导入]What is the equivalent to regsvr32 in .NET?
- New C# Features in the .NET Framework 4
- What ’ s in the .NET Framework?[摘自Beginning Visual C# 2008]
- What's New in the .NET Framework 4
- What is the .NET Framework?
- .NET 4.0 will come soon, let’s review what is new in .net 3.0
- what’s new in the .NET CLR 4.0/4.5 GC (.NET 4/4.5里新的垃圾收集机制)
- PRB: "Requested Registry Access Is Not Allowed" Error Message When ASP.NET Application Tries to Write New EventSource in the Eve
- WCF------Dealing with Diversity:Understanding WCF Communication Options in the .NET Framework 3.5
- What is the difference between .NET 1.1,2.0,3.0,3.5 and 4.0
- .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework
- What is Managed Code and Unmanaged Code in .Net Framework
- New C# Features in the .NET Framework 4