阶级问题 [英] Class problem
问题描述
我似乎无法想出这一个。
这是我的班级结构
命名空间名称
{
公共课foo
{
}
}
>
名称空间名称
{
公共类foo1
{
foo propf = new foo( );
}
public foo propf;
}
在对象浏览器''propf''中没有出现在课堂上。它只是作为foo1的成员变量出现
。在对象浏览器中,如果你看一下
system.System对象,你会看到几个成员变量的对象和
你可以扩展它们。
>
我缺少什么?
谢谢,
lee franke
I can''t seem to figure this one out.
Here is my class structure
namespace name
{
public class foo
{
}
}
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
In the object browser ''propf'' does not show up as a class. It just appears
just as a member variable of foo1. In the object browser if you look at the
system.System object you see several objects that are members variables and
you can expand them.
What am I missing?
thanks,
lee franke
推荐答案
李,
我不知道你期待看到什么。这段代码没有编译。
public foo propf在foo1定义之外,应该抛出一个
编译器错误。
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
名称空间名称
{
公共类foo1
{
foo propf = new foo();
}
公共foo propf;
}
" Lee Franke" <乐******** @ fnc.fujitsu.com>在留言中写道
新闻:%2 ****************** @ TK2MSFTNGP11.phx.gbl ...我好像无法想象这一个。
这是我的班级结构
名称空间名称
{
公共班级foo
{
} <名称空间名称
{
公共类foo1
{
foo propf = new foo();
}
public foo propf;
}
在对象浏览器中,''propf''不会显示为类。它只是作为foo1的成员变量出现。在对象浏览器中,如果你看一下系统对象,你会看到几个对象是成员的变量,你可以扩展它们。
我缺少什么?
谢谢,
lee franke
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
"Lee Franke" <le********@fnc.fujitsu.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...I can''t seem to figure this one out.
Here is my class structure
namespace name
{
public class foo
{
}
}
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
In the object browser ''propf'' does not show up as a class. It just appears
just as a member variable of foo1. In the object browser if you look at
the system.System object you see several objects that are members
variables and you can expand them.
What am I missing?
thanks,
lee franke
它编译得很好。但是请稍等一下,那么你如何得到
所需的结果呢?
谢谢,
lee franke
Nicholas Paldino [.NET / C#MVP]" < mv*@spam.guard.caspershouse.com>写在
消息新闻:OI **************** @ TK2MSFTNGP09.phx.gbl ...
It compiles fine. But leave that out for a second, how would you get the
desired results then?
thanks,
lee franke
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OI****************@TK2MSFTNGP09.phx.gbl...
Lee,
我不知道你期待看到什么。这段代码没有编译。
公共foo propf在foo1定义之外,应该抛出编译器错误。
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
Lee,
I don''t know what you are expecting to see. This code doesn''t compile.
The "public foo propf" is outside of the foo1 definition, and should throw
a compiler error.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
命名空间名称
{<公共课foo1
{
foo propf = new foo();
}
公共foo propf;
}
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
< br>李洪弗兰克<乐******** @ fnc.fujitsu.com>在消息中写道
新闻:%2 ****************** @ TK2MSFTNGP11.phx.gbl ...
"Lee Franke" <le********@fnc.fujitsu.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
我可以''好像想出这个。
这是我的班级结构
名称空间名称
{
公共班级foo
{
{
公共类foo1
{
foo propf = new foo();
}
公共foo propf;
}
在对象浏览器中,''propf''不会显示为类。它只是作为foo1的成员变量出现。在对象浏览器中,如果您查看system.System对象,您会看到几个对象是成员的变量,您可以展开它们。
我缺少什么?
谢谢,
lee franke
I can''t seem to figure this one out.
Here is my class structure
namespace name
{
public class foo
{
}
}
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
In the object browser ''propf'' does not show up as a class. It just
appears just as a member variable of foo1. In the object browser if you
look at the system.System object you see several objects that are members
variables and you can expand them.
What am I missing?
thanks,
lee franke
Lee,>
发布的代码编译不正确。你得到一个预期的类,
委托,枚举,接口或结构错误就行了:
public foo propf;
至于想要的结果,你想做什么?
-
- Nicholas Paldino [.NET / C#MVP]
- mv * @ spam.guard.caspershouse.com
" Lee Franke" <乐******** @ fnc.fujitsu.com>在留言中写道
新闻:eZ **************** @ TK2MSFTNGP11.phx.gbl ...
Lee,
The code, as posted, does not compile fine. You get a "Expected class,
delegate, enum, interface, or struct" error on the line:
public foo propf;
As for the desired results, what are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Lee Franke" <le********@fnc.fujitsu.com> wrote in message
news:eZ****************@TK2MSFTNGP11.phx.gbl...
编译好。但是暂时不说了,那么你将如何获得所需的结果呢?
谢谢,
lee franke
" ; Nicholas Paldino [.NET / C#MVP]" < mv*@spam.guard.caspershouse.com>在消息新闻中写道
:OI **************** @ TK2MSFTNGP09.phx.gbl ...
It compiles fine. But leave that out for a second, how would you get the
desired results then?
thanks,
lee franke
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OI****************@TK2MSFTNGP09.phx.gbl...
Lee,
<我不知道你期待看到什么。这段代码没有编译。 公共foo propf在foo1定义之外,
应该抛出编译器错误。
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
Lee,
I don''t know what you are expecting to see. This code doesn''t
compile. The "public foo propf" is outside of the foo1 definition, and
should throw a compiler error.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
命名空间名称
{<公共课foo1
{
foo propf = new foo();
}
公共foo propf;
}
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
< br>李洪弗兰克<乐******** @ fnc.fujitsu.com>在消息中写道
新闻:%2 ****************** @ TK2MSFTNGP11.phx.gbl ...
"Lee Franke" <le********@fnc.fujitsu.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
我可以''好像想出这个。
这是我的班级结构
名称空间名称
{
公共班级foo
{
{
公共类foo1
{
foo propf = new foo();
}
公共foo propf;
}
在对象浏览器中,''propf''不会显示为类。它只是作为foo1的成员变量出现。在对象浏览器中,如果您查看system.System对象,您会看到几个对象是成员变量,您可以展开它们。
我缺少什么?
谢谢,
lee franke
I can''t seem to figure this one out.
Here is my class structure
namespace name
{
public class foo
{
}
}
namespace name
{
public class foo1
{
foo propf = new foo();
}
public foo propf;
}
In the object browser ''propf'' does not show up as a class. It just
appears just as a member variable of foo1. In the object browser if you
look at the system.System object you see several objects that are
members variables and you can expand them.
What am I missing?
thanks,
lee franke
这篇关于阶级问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!