Namespace Problem

º

ºa¤Ö

I have two class which wroten in C#, they are Company and Address, and I
want define they are under a same namespace, I found a lot but not much
resource talking about it, i tried following method

// Company.cs
using System;

namespace Project1.Domain.Company {
public class Company {
public Company() {}
}
}

// Address.cs
using System;

namespace Project1.Domain.Address {
public class Address {
public Address() {}
}
}

And in my aspx page, I need
<%@ import namespace="Project1.Domain.Company" %>
<%@ import namespace="Project1.Domain.Address" %>

but cannot like follow
<%@ import namespace="Project1.Domain.*" %>

Any solution? Is that I need place the two class in a file like follow?
using System;

namespace Project1.Domain {
public class Company {
public Company() {}
}

public class Address {
public Address() {}
}
}

Thanks
 
D

Daniel Fisher\(lennybacon\)

// Company.cs
using System;
namespace Project1.Domain{
public class Company {}
}

// Address.cs
using System;

namespace Project1.Domain{
public class Address {}
}
 
º

ºa¤Ö

problems solved
^.^

Daniel Fisher(lennybacon) said:
// Company.cs
using System;
namespace Project1.Domain{
public class Company {}
}

// Address.cs
using System;

namespace Project1.Domain{
public class Address {}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top