Full name separator in C# is period character (.
). e.g. System.Console.Write
.
Is this defined somewhere like Path.PathSeperator
, or is it hard coded in .NET reflection classes as well?
(e.g. is Type.FullName
implemented as Type.Namespace + "." + Type.Name
assuming that it won't change?
What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.
C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on.
C is an imperative procedural language supporting structured programming, lexical variable scope, and recursion, with a static type system. It was designed to be compiled to provide low-level access to memory and language constructs that map efficiently to machine instructions, all with minimal runtime support.
While both C and C++ may sound similar, their features and usage are different. C is a procedural programming language and does not support objects and classes. C++ is an enhanced version of C programming with object-oriented programming support.
Basically: the language specification. But actually, Type.FullName
uses the BCL definitions, not the C# definitions - and interestingly they disagree. For example:
namespace X {
public class Y {
public class Z {}
}
}
To C#, Z
is X.Y.Z
; to the BCL it is X.Y+Z
. The representation of generics changes too - with the BCL using back-ticks and numbers rather than angular brackets. I believe the BCL uses the CLI's format of types (which has a separate specification), but if you think about it: it is not required to do so (except for during reflection-emit).
AFAIK, these separators are not exposed via anything like Path.PathSeparator
- but is, as you say, hard coded into the Type
etc classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With