Net. Framework 4.0 ((full)) Page
Console.WriteLine($"Result: {task.Result}"); } }
// Starting a task Task<int> task = Task.Factory.StartNew(() => { int sum = 0; for (int i = 0; i < 1000; i++) sum += i; return sum; }); net. framework 4.0
The BCL grew significantly, adding namespaces such as System.Numerics (for BigInteger and complex numbers), System.Threading.Tasks , and System.Runtime.Caching . These additions shifted routine operations from third-party libraries into the core framework, improving consistency and security. Console
The CLR in .NET 4.0 introduced in-process side-by-side execution, allowing different versions of the same application domain to run simultaneously within a single process. This resolved "DLL hell" for mixed-version deployments. Additionally, the CLR added better garbage collection (GC) modes—specifically, background workstation GC and concurrent server GC—reducing latency in interactive applications. task = Task.Factory.StartNew(() =>
