473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

<PrivateImplementationDetails>

I was looking at some commercial assemblies that we had purchased through
Lutz Roeder's .Net Reflector, and noticed this entry in some of them.

What is it and how does it get there?

Also, under this same namespace node (no name) there is an internal class.
How does one go about putting an internal class under this non-identified
namespace? (it's the same one where you find the <Module> and AssemblyRef
classes.

David
Jul 21 '05 #1
3 12860
I did a little more digging (experimenting) and it looks like the internal
class is in the AssemblyInfo.cs file, which leads me to another question.
Why would you want to define a class in that file? Would this be like a
global definition? Is this safe?

If you have answers to these or the original <PrivateImplementationDetails>
question, please respond. I'm trying to learn as many tricks of the trade
as I can.

Thanks again,
David

"dm_dal" <RE******************@yahoo.com> wrote in message
news:eK**************@TK2MSFTNGP15.phx.gbl...
I was looking at some commercial assemblies that we had purchased through
Lutz Roeder's .Net Reflector, and noticed this entry in some of them.

What is it and how does it get there?

Also, under this same namespace node (no name) there is an internal class.
How does one go about putting an internal class under this non-identified
namespace? (it's the same one where you find the <Module> and AssemblyRef
classes.

David

Jul 21 '05 #2
I did a little more digging (experimenting) and it looks like the internal
class is in the AssemblyInfo.cs file,
If you only have the compiled assembly and not the source or debug
symbols, how can you know which source file a class originates from?

Why would you want to define a class in that file? Would this be like a
global definition? Is this safe?


AssemblyInfo.cs is just another source file. Types defined there are
no less safe or more global than in other files.

I was looking at some commercial assemblies that we had purchased through
Lutz Roeder's .Net Reflector, and noticed this entry in some of them.

What is it and how does it get there?
It's a compiler generated class. It can be generated for example to
store array initialization data such as for code like this

int[] ints = {1,2,3,4,5};

Also, under this same namespace node (no name) there is an internal class.
How does one go about putting an internal class under this non-identified
namespace?


Just don't put it inside a namespace {} block.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #3
If you only have the compiled assembly and not the source or debug
symbols, how can you know which source file a class originates from?
Trial and error. Since it appears with the <Method> and <AssemblyRef>
information and I believe this is set from the assembly manifest
(AssemblyInfo.cs) then I assumed that's where it was. I tried it with one
of my Assemblies and got the same results.
AssemblyInfo.cs is just another source file. Types defined there are
no less safe or more global than in other files.
I guess by my "more global" question I was really refering to the fact that
it could be used from any class, from within any namespace in your assembly,
without having to include a "using" statement for the namespace or typing
out the fully qualified type definition when you use it. Such as:

System.Windows.Forms.Form
if Form was defined in the AssemblyInfo.cs, any of your classes could use it
by just typing "Form"
It's a compiler generated class. It can be generated for example to
store array initialization data such as for code like this

int[] ints = {1,2,3,4,5};


So how do you tell the compiler to generate the
<PrivateImplementationDetails> class and where does it get the information
it needs?
Also, under this same namespace node (no name) there is an internal class. How does one go about putting an internal class under this non-identified namespace?


Just don't put it inside a namespace {} block.


That makes sense.

David Young
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dm_dal | last post by:
I was looking at some commercial assemblies that we had purchased through Lutz Roeder's .Net Reflector, and noticed this entry in some of them. What is it and how does it get there? Also,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.