[CLOSED] 'Model' is a namespace but is used like a 'type'

  1. #1

    [CLOSED] 'Model' is a namespace but is used like a 'type'

    Hello,
    Can you please let me know how to fix this error message while trying to create a new instance of the "Model" object : 'Model' is a 'namespace' but is used like a 'type'. I am using Ext 2.1.

    Thanks in advance for your help.

    Below is my code:
     public void BuildLevel(int level, string recId, string gridId, int TrailerNum)
            {
                var storeId = "L".ConcatWith(level, "_", recId, "_Store");
                var newGridId = "L".ConcatWith(level, "_", recId, "_Grid");
    
                // build store
                var store = new Store { ID = storeId };
                var model = new Model { IDProperty = "ID" };
                model.Fields.Add("ID", "Name");
                model.Fields.Add("Destination");
                model.Fields.Add("TrailerNumber");
                model.Fields.Add(new ModelField
                                      {
                                          Name = "Level",
                                          DefaultValue = level.ToString()
                                      });
                store.Model.Add(model);
    }
    below is the entire list of using statement:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Ext.Net;
    using Ext.Net.Utilities;
    Last edited by Daniil; Oct 10, 2012 at 5:06 PM. Reason: [CLOSED]
  2. #2
    I guess that that 'Model' is part of your namespace
    Try to use full quilified name
    var model = new Ext.Net.Model();
  3. #3
    Thank you. I will do it that way. I am trying not to do it that way because the same syntax works for me in all other projects. I included all the Ext namespaces.
    Quote Originally Posted by Vladimir View Post
    I guess that that 'Model' is part of your namespace
    Try to use full quilified name
    var model = new Ext.Net.Model();

Similar Threads

  1. Replies: 7
    Last Post: Oct 02, 2012, 8:05 PM
  2. Replies: 3
    Last Post: Jul 02, 2012, 8:27 AM
  3. The type or namespace name 'Ext' could not be found
    By andrefreitasjr in forum 1.x Help
    Replies: 1
    Last Post: Feb 28, 2012, 1:03 PM
  4. Change input type based on data type
    By bjones in forum 1.x Help
    Replies: 5
    Last Post: Jan 06, 2012, 9:54 AM
  5. Replies: 2
    Last Post: Jul 07, 2010, 10:28 AM

Tags for this Thread

Posting Permissions