0

In C++, I can have a foo.h like that

#include "a.h"
#include "b.h"
#include "c.h"

And if I include foo.h in another file, I can use everything that is in a.h, b.h and c.h without having to import them each time

Is there a way to do something similar in c#?

Something like regrouping

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

and every using that I always use in one namespace

Bruno
  • 623
  • 2
  • 9
  • 24
  • 2
    if you're talking about `using` *directives*, the answer is no. – DLeh Feb 04 '15 at 19:07
  • @DLeh yes, I edited my question for clarity – Bruno Feb 04 '15 at 19:09
  • 1
    possible duplicate http://stackoverflow.com/q/24512894/526704 – DLeh Feb 04 '15 at 19:12
  • 3
    `Using` directives are NOT the same thing as `#include` in C or C++. `#include` is for including a header file in your source file. `Using` is for importing namespaces. It is more similar to C++'s `using namespace` directive. And there is nothing at all like it in C. – Icemanind Feb 04 '15 at 19:13

1 Answers1

0

Unfortunately with using directives this is not possible.

Matt Clark
  • 1,171
  • 6
  • 12