What namespace are my classes when I don't put a namespace?

if I do not put the namespace in my classes (vs .net 2008), what namespace does my classes build under?

Update It is strange that when I add a namespace, I cannot reference class methods from my user control.

If I explicitly set the namespace and add “use ...” to my control, I still can't see it!

How can it be?

    using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
/// <summary>
/// Summary description for Globals
/// </summary>
public class Globals
{
    public Globals()
    { }


    public static string ConnectionString
    {
        get
        {
            return ConfigurationManager.ConnectionStrings["MyDb"].ConnectionString;
        }
    }

}

My management:

using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


public partial class MyStats : System.Web.UI.UserControl
{




    protected void Page_Load(object sender, EventArgs e)
    {


    //etc.
+3
source share
2 answers

, . , . , , .

: , , , . , , , ProjectA ProjectB. ProjectB ProjectA, , .

+4

, , .

- , ,

, , "" , , - :: ... , , ?

+1

Source: https://habr.com/ru/post/1705887/


All Articles