亲爱的MICROSOFT,关于部分类型的更多细节,请...... [英] Dear MICROSOFT, more details on Partial Types, PLEASE.....

查看:86
本文介绍了亲爱的MICROSOFT,关于部分类型的更多细节,请......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,之前我问过这个问题,我也看了一下在ASP.NET 2.0上看看第一眼看上去好吗?

我还读过Paul wilson'的网页说明。但是......


这本书和那个网页讨论了部分类型,如果你有一个

扩展关键字,我认为,之前类名和相同的命名空间,.NET

将自动编译位于另一个

文件中的其余类。


但是,我想知道.NET究竟将如何找到那个

文件......


有.aspx页面具有complieswith属性和其他一些

属性,可以像以前一样查找CodeBehind文件。


但是,究竟是怎样的.NET找到另一个文件????????


它是否先搜索并阅读同一目录中的每一个文件和

工作吧'' s找到应用程序中的其他文件找到一个类

匹配的名称和命名空间?


Ok, I asked this question before and I also looked at the book "First Look
at ASP.NET 2.0"
I also read Paul wilson''s web page explanation. HOWEVER......

The book and that web page talks about partial types and that IF you have a
Extends keyword, I think, before the class name AND the same Namespace, .NET
will automatically compile the rest of the class that is located in another
file.

However, I want to know just exactly how is .NET going to find that OTHER
file......

There is the .aspx page that has the complieswith attribute and some other
attribute that can as before look for the CodeBehind file.

However, just exactly how does .NET find the other FILE????????

Does it search first and READ every single FILE in the same directory and
work it''s way out to the other files within the application to find a class
name and namespace that matches?


推荐答案

嗨Nospam,


首先,这个公共新闻组不是微软。有微软参与的人们和微软的人们会在这个新闻组中检查自己是否感到尴尬和完全不好的行为,但它永远不会是微软的b $ b微软谁回答,它总是个人,即使他们来自微软。


但是为了帮助你,也许aspx页面的第一行会告诉你你这是什么东西


<%@ Page Language =" vb" AutoEventWireup = QUOT假QUOT; Codebehind =" WebForm1.aspx.vb"

Inherits =" WebApplication1.WebForm1"%>


背后的代码很清楚我认为它和它继承WebForm1类,当你看到它时,
本身会继承System.Web.UI.page。


用户看不到它,因为当它是发送,这个信息不是
发送。


我希望这对你有所帮助。


Cor
Hi Nospam,

First of all, this Public newsgroups is not Microsoft. There are Microsoft
people participating and Microsoft people checks themself for intresting
things and totaly bad behaviour in this Newsgroups, but it is never
Microsoft who answers, it are always individuals, even if they are from
Microsoft.

But to help you, maybe this first row from the aspx page will tell you
something

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="WebApplication1.WebForm1"%>

The code behind is clear I think and it Inherits the WebForm1 class, which
itself inherits the System.Web.UI.page when you see that.

The user does not see it, because when it is send, this information is not
sended.

I hope this helps you a little bit.

Cor


你不明白我得到了什么。


至少有三(3)个档案部分类型。


(1)MyPartialType.aspx文件< - .aspx网页

(2)MyPartialType.aspx .cs文件< - 已经引用的标准代码
上面(1)中的



(3)MyPartialTypeWhereAmI.aspx.cs< - ---文件,我不知道.NET

知道它在哪里?????????

怎么样,。 NET,知道哪里(3)是???????????? ??


" Cor" < no*@non.com>在消息中写道

news:%2 ****************** @ TK2MSFTNGP10.phx.gbl ...
You don''t understand what I am getting at.

There are at least THREE (3) files in a partial type.

(1) MyPartialType.aspx file <-- .aspx web page

(2) MyPartialType.aspx.cs file <-- standard code behind already referenced
in the (1) above

(3) MyPartialTypeWhereAmI.aspx.cs <----- file that I don''t know how .NET
knows where it''s at????????
How does it, .NET, know where (3) is?????????????

"Cor" <no*@non.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
嗨Nospam,

首先,这个公共新闻组不是微软。有微软的人参与,微软的人会在这个新闻组中检查自己有趣的事情以及完全不好的行为,但它永远不会是微软的回答,它总是个人,即使他们是来自
Microsoft。

但是为了帮助你,也许aspx页面的第一行会告诉你

<%@ Page Language = QUOT; VB" AutoEventWireup = QUOT假QUOT;
Codebehind =" WebForm1.aspx.vb" Inherits =" WebApplication1.WebForm1"%>

后面的代码很清楚我认为它继承了WebForm1类,当你自己继承System.Web.UI.page时看到了。

用户没有看到它,因为发送时,这些信息没有被发送。

我希望这对你有所帮助。

Cor
Hi Nospam,

First of all, this Public newsgroups is not Microsoft. There are Microsoft
people participating and Microsoft people checks themself for intresting
things and totaly bad behaviour in this Newsgroups, but it is never
Microsoft who answers, it are always individuals, even if they are from
Microsoft.

But to help you, maybe this first row from the aspx page will tell you
something

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>

The code behind is clear I think and it Inherits the WebForm1 class, which
itself inherits the System.Web.UI.page when you see that.

The user does not see it, because when it is send, this information is not
sended.

I hope this helps you a little bit.

Cor



Hi nospam


考虑到你的明显不喜欢面向对象的技巧,以及你对KISS原则的接受,为什么你会使用部分类型?


我个人从来没有找到他们的需要(或每行的首都)

:)


问候


Ron

" nospam" < n@ntspam.com>在消息中写道

新闻:O6 ************** @ tk2msftngp13.phx.gbl ...
Hi nospam

Considering your apparent dislike of OO techniques, and your embracement of
the KISS principle, why would you be using partial types?

Personally I have NEVER found the NEED for them (or capitals in every line)
:)

Regards

Ron

"nospam" <n@ntspam.com> wrote in message
news:O6**************@tk2msftngp13.phx.gbl...
好的,我问过这个之前的问题,我也查看了First
看看ASP.NET 2.0这本书。
我还阅读了Paul wilson的网页解释。但是......

这本书和那个网页讨论了部分类型,如果你有
a扩展关键字,我想,在类名和相同的命名空间之前,
..NET将自动编译位于
另一个文件中的其余类。

但是,我想知道.NET究竟是如何找到其他文件的
文件......

有一个.aspx页面,它具有complieswith属性和其他一些
属性,可以像以前一样查找CodeBehind文件。然而,正是.NET究竟如何找到其他文件????????

是否首先搜索并读取同一目录中的每个文件并且类名和命名空间?
Ok, I asked this question before and I also looked at the book "First Look at ASP.NET 2.0"
I also read Paul wilson''s web page explanation. HOWEVER......

The book and that web page talks about partial types and that IF you have a Extends keyword, I think, before the class name AND the same Namespace, ..NET will automatically compile the rest of the class that is located in another file.

However, I want to know just exactly how is .NET going to find that OTHER
file......

There is the .aspx page that has the complieswith attribute and some other
attribute that can as before look for the CodeBehind file.

However, just exactly how does .NET find the other FILE????????

Does it search first and READ every single FILE in the same directory and
work it''s way out to the other files within the application to find a class name and namespace that matches?



这篇关于亲爱的MICROSOFT,关于部分类型的更多细节,请......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆