[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Can I get a instance from type?

???????-???

6/10/2004 6:38:00 AM

i konw a type(no class),can i get this type`s instance list?



7 Answers

ÁõÃô

6/10/2004 7:37:00 AM

0

¿ÉÒÔ˵µÃÇå³þÒ»µãÂð£¿

type(no class)£¿Ê²Ã´Òâ˼£¿



--
ÁõÃô
Rustle Liu

http://www.cnblogs.c...

"&#186;&#249;&#194;&#171;&#181;&#186;&#201;&#204;&#199;&#230;&#200;&#237;&#188;&#254;&#163;&#173;&#213;&#197;&#208;&#194;&#189;&#168;" <Sunginezxj@sina.com> &#208;&#180;&#200;&#235;&#207;&#251;&#207;&#162;
news:e3LnIWrTEHA.2372@TK2MSFTNGP11.phx.gbl...
> i konw a type(no class),can i get this type`s instance list?
>
>
>


???????-???

6/10/2004 7:56:00 AM

0

&#186;&#199;&#186;&#199;&#163;&#172;&#211;&#162;&#211;&#239;&#189;&#207;&#178;&#238;&#163;&#172;
&#202;&#199;&#213;&#226;&#209;&#249;&#181;&#196;&#163;&#172;&#206;&#210;&#211;&#208;&#210;&#187;&#184;&#246;&#188;&#204;&#179;&#208;&#215;&#212;MarshalByRef&#181;&#196;&#192;&#224;SvcController&#177;&#187;&#215;&#162;&#178;&#225;&#206;&#170;Singleton.
&#205;&#172;&#202;&#177;&#163;&#172;&#213;&#226;&#184;&#246;&#192;&#224;&#212;&#218;&#177;&#190;AppDomain&#214;&#208;&#191;&#201;&#196;&#220;&#177;&#187;&#202;&#181;&#192;&#253;&#187;&#175;&#193;&#203;&#182;&#224;&#180;&#206;&#163;&#172;

&#206;&#210;&#207;&#214;&#212;&#218;&#207;&#235;&#214;&#170;&#181;&#192;&#163;&#172;&#196;&#196;&#184;&#246;&#202;&#181;&#192;&#253;&#202;&#199;&#177;&#187;&#212;&#182;&#179;&#204;&#202;&#181;&#192;&#253;&#187;&#175;&#181;&#196;&#163;&#172;&#200;&#187;&#186;&#243;&#206;&#210;&#181;&#247;&#211;&#195;&#213;&#226;&#184;&#246;&#177;&#187;&#212;&#182;&#179;&#204;&#202;&#181;&#192;&#253;&#187;&#175; &#202;&#181;&#192;&#253; &#181;&#196;&#183;&#189;
&#183;&#168;&#163;&#172;&#210;&#212;&#180;&#165;&#183;&#162;&#210;&#187;&#184;&#246;&#202;&#194;&#188;&#254;&#205;&#168;&#214;&#170;&#191;&#205;&#187;&#167;&#161;&#163;

&#178;&#187;&#196;&#220;&#181;&#247;&#211;&#195;&#203;&#249;&#211;&#208;&#202;&#181;&#192;&#253;&#181;&#196;&#163;&#168;&#210;&#242;&#206;&#170;&#200;&#231;&#185;&#251;&#181;&#247;&#211;&#195;&#177;&#190;&#181;&#216;&#181;&#196;&#202;&#181;&#192;&#253;&#163;&#172;&#187;&#225;&#210;&#253;&#198;&#240;&#207;&#251;&#207;&#162;&#209;&#173;&#187;&#183;&#163;&#169;&#161;&#163;

&#212;&#245;&#195;&#180;&#178;&#197;&#196;&#220;&#197;&#208;&#182;&#207;&#196;&#196;&#184;&#246;&#202;&#181;&#192;&#253;&#202;&#199;&#177;&#187;&#212;&#182;&#179;&#204;&#202;&#181;&#192;&#253;&#187;&#175;&#181;&#196;&#196;&#216;&#163;&#191;







"&#193;&#245;&#195;&#244;" <rustle_liu@hotmail.com.discuss> &#208;&#180;&#200;&#235;&#211;&#202;&#188;&#254;
news:OmJmy2rTEHA.3924@TK2MSFTNGP10.phx.gbl...
> &#191;&#201;&#210;&#212;&#203;&#181;&#181;&#195;&#199;&#229;&#179;&#254;&#210;&#187;&#181;&#227;&#194;&#240;&#163;&#191;
>
> type(no class)&#163;&#191;&#202;&#178;&#195;&#180;&#210;&#226;&#203;&#188;&#163;&#191;
>
>
>
> --
> &#193;&#245;&#195;&#244;
> Rustle Liu
>
> http://www.cnblogs.c...
>
> "&#186;&#249;&#194;&#171;&#181;&#186;&#201;&#204;&#199;&#230;&#200;&#237;&#188;&#254;&#163;&#173;&#213;&#197;&#208;&#194;&#189;&#168;" <Sunginezxj@sina.com> &#208;&#180;&#200;&#235;&#207;&#251;&#207;&#162;
> news:e3LnIWrTEHA.2372@TK2MSFTNGP11.phx.gbl...
> > i konw a type(no class),can i get this type`s instance list?
> >
> >
> >
>
>


Morten Wennevik [C# MVP]

6/10/2004 8:20:00 AM

0

Just a question. What encoding do you use for your messages? I am unable to see your text as the encoding isn''t specified in the message.

--
Happy coding!
Morten Wennevik [C# MVP]

???????-???

6/10/2004 8:31:00 AM

0

SIMPLE CHINESE GB2312

"Morten Wennevik" <MortenWennevik@hotmail.com> ????
news:opr9ddfye1klbvpo@morten_x.edunord...
> Just a question. What encoding do you use for your messages? I am unable
to see your text as the encoding isn''t specified in the message.
>
> --
> Happy coding!
> Morten Wennevik [C# MVP]


cody

6/10/2004 8:34:00 AM

0

Activator.CreateInstance(Type type)

--
cody

Freeware Tools, Games and Humour
http://www.deutro... || http://www.deu...
"&#186;&#249;&#194;&#171;&#181;&#186;&#201;&#204;&#199;&#230;&#200;&#237;&#188;&#254;&#163;&#173;&#213;&#197;&#208;&#194;&#189;&#168;" <Sunginezxj@sina.com> schrieb im Newsbeitrag
news:e3LnIWrTEHA.2372@TK2MSFTNGP11.phx.gbl...
> i konw a type(no class),can i get this type`s instance list?
>
>
>


Morten Wennevik [C# MVP]

6/10/2004 8:44:00 AM

0

Ah, well, I found a GBK/BG2312 encoding, which will output the text in Chinese, but since I don''t know any Chinese beyond "ni hao" I guess it doesn''t really matter :)

On Thu, 10 Jun 2004 16:31:14 +0800, ???????-??? <Sunginezxj@sina.com> wrote:

> SIMPLE CHINESE GB2312
>
> "Morten Wennevik" <MortenWennevik@hotmail.com> ????
> news:opr9ddfye1klbvpo@morten_x.edunord...
>> Just a question. What encoding do you use for your messages? I am unable
> to see your text as the encoding isn''t specified in the message.
>>
>> --
>> Happy coding!
>> Morten Wennevik [C# MVP]
>
>
>



--
Happy coding!
Morten Wennevik [C# MVP]

Nicholas Paldino [.NET/C# MVP]

6/10/2004 1:36:00 PM

0

No, you can not. There is no way to see what instances of a type exist
in the current app domain. You ^might^ be able to do this through the hooks
that the CLR provides, but I wouldn''t recommend it.

If you need this information, I would recommend using a class factory
pattern, where you can keep track of the instances that are created and then
retrieve them when necessary.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"&#186;&#249;&#194;&#171;&#181;&#186;&#201;&#204;&#199;&#230;&#200;&#237;&#188;&#254;&#163;&#173;&#213;&#197;&#208;&#194;&#189;&#168;" <Sunginezxj@sina.com> wrote in message
news:e3LnIWrTEHA.2372@TK2MSFTNGP11.phx.gbl...
> i konw a type(no class),can i get this type`s instance list?
>
>
>