Reputation: 20129
I'm new to .Net and I just saw this code that doesn't make sense to me (slightly abridged):
namespace test
{
public class sub : super
{
public sub(string text);
}
}
As you can see, there is a constructor that takes an argument, but does not implement a definition. How does that work? My guess is that it somehow relates to the super class, but I dont understand how, and I havent been able to find anything on Google.
Edit: Im running this in VS2010, and I just noticed that the tab has [from metadata]
in the title. Perhaps this is why?
Upvotes: 2
Views: 103
Reputation: 59
It looks like code but it is text based on the metadata in the assembly. It means that the IDE is unable to access the source code in question.
Upvotes: 0
Reputation: 91580
That's not code.
That's text that looks somewhat like code based on the metadata in the assembly. You'll see this when the IDE doesn't have access to the source code in question (For example, you press F12 on a method in a referenced assembly.) It provides the method signatures, properties, fields, etc from the types, without providing any of the actual implementation.
As written, the code you posted wouldn't even compile in C#.
Upvotes: 6
Reputation: 61
If from the metadata, it's not going to show you the implementation of the methods.
Upvotes: 2