Can't use declared dictionary inside the same class?
<p>Ok so, I can't figure out what the hell is going on.</p>

<p>I declared and initialised a dictionary:</p>

<pre><code>public Dictionary&lt;byte, Color&gt; blobType = new Dictionary&lt;byte, Color&gt;();
</code></pre>

<p>But I can't use it inside the class, intelliscence wont show it either. I get errors if I try to use it like this:</p>

<pre><code>blobType.add(1, Color.White);
</code></pre>

<p>Or if I don't initialize it and try to later:</p>

<pre><code>    public Dictionary&lt;byte, Color&gt; blobType;
    blobType = new Dictionary&lt;byte, Color&gt;();
</code></pre>

<p>Still can't use it, its like it doesn't see the blobType that it is there.</p>

<p>I tried renaming the variable, do it in VS2012, still the same thing happens. So it can access it outside of the class when the class is an object in another class. But VS2010 C# Express refuses to acknowledge its existence in the class I declared it in. What's going on?</p>

<p>As requested, entire class:</p>

<pre><code>namespace blob
{
    class Blob
    {
        public Texture2D texture;

        public Dictionary&lt;byte, Color&gt; blobType = new Dictionary&lt;byte, Color&gt;();
        blobType.add(1, Color.White);

        public Vector2 position;

        private float scale = 1;
        public float Scale
        {
            get { return scale; }
            set { scale = value; }
        }

        public Blob(Texture2D texture, float scale)
        {
            this.texture = texture;
            this.Scale = scale;
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texture, position, null, Color.White, 0, Vector2.Zero, Scale, SpriteEffects.None, 0);
        }
    }
}
</code></pre>

<p>EDIT2: Capitalising Add, same thing.
Errors:</p>

<pre><code>Error   1   Invalid token '(' in class, struct, or interface member declaration C:\Users\Iurie\Documents\Visual Studio 2010\Projects\blob\blob\blob\Blob.cs 20  21  blob

Error   2   Invalid token ')' in class, struct, or interface member declaration C:\Users\Iurie\Documents\Visual Studio 2010\Projects\blob\blob\blob\Blob.cs 20  36  blob

Error   3   'blob.Blob.blobType' is a 'field' but is used like a 'type' C:\Users\Iurie\Documents\Visual Studio 2010\Projects\blob\blob\blob\Blob.cs 20  9   blob

Error   4   'Microsoft.Xna.Framework.Color.White' is a 'property' but is used like a 'type' C:\Users\Iurie\Documents\Visual Studio 2010\Projects\blob\blob\blob\Blob.cs 20  31  blob
</code></pre>
