2
Answers

How to use "using"?

Jack

Jack

16y
2.3k
1

I have following

namespace Mine.Bits

{

public static class Bits

{

   static class Bits {   static UInt64[] BitMasks;

   static Bits(){  <generation of BitMasks> }

   UInt64 BitMask(int i) { return BitMasks[i]}

}

In another file I specify

using Mine.Bits;

but despite that I have to use

UInt64 CurrentMask = Mine.Bits.Bits.BitMask(3);

instead of just BitMask(3)

 

As I'm new to C# I would like to know what i do wrong and how I should achieve my goal.

Also operator overloading to GET BitMasks[i] would be nice (of course checking on bounds)

   

Answers (2)