I have a class in a web service that has a nested class in it.
namespace MyWS
{
// web service class with web methods etc. here
public class SomeClass
{
// fields, properties, stuff etc.
public class NestedClass
{
// ...
}
}
}
When I try to make a web reference out of the web service, NestedClass
is no longer nested and is outside of SomeClass
as a standalone class in the reference (accessed through MyWS.NestedClass
). Is there any way to force it to stay nested when web reference is generated next time? Some kind of attribute maybe?
I'm using .NET 2.0 and VS 2005, if it makes any difference. If possible please don't suggest upgrading to newer technology/environment as a solution.
EDIT: It's not a matter of architecture. I don't really need the class to be nested there and I can easily change it so it makes more sense. I just wonder if it's possible to force it to be nested in the reference if I wanted to.