Importing static methods from a namespace in C# 6

You’ll probably know that if you’d like to use the simple class names in a C# file you have to import its namespace in a using directive. If you want to use the Task class without referring to its fully qualified name including the namespace you have to put…

using System.Threading.Tasks;

…in the top section of the file. Then you can write something like…

Task t = Task.Run<ReturnType>(() => ...);

Similarly the using statement…

using System;

Read more of this post

Advertisements
ultimatemindsettoday

A great WordPress.com site

Elliot Balynn's Blog

A directory of wonderful thoughts

Softwarearchitektur in der Praxis

Wissenswertes zu Webentwicklung, Domain-Driven Design und Microservices

Technology Talks

on Microsoft technologies, Web, Android and others

Software Engineering

Web development

Disparate Opinions

Various tidbits

chsakell's Blog

WEB APPLICATION DEVELOPMENT TUTORIALS WITH OPEN-SOURCE PROJECTS

Guru N Guns's

OneSolution To dOTnET.

Johnny Zraiby

Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

%d bloggers like this: