You searched for how does c# work
. We found 81
results in 0.401 seconds.
Is LinkText a method. Yes. I thought methods are similar to functions. That's right. How is ClassName MethodName is used here. In the declaration? That just indicates what the method returns. So to pull this declaration... more
How does the .Contains() method perform the comparison? It uses the default equality comparer for the type, as documented: This method determines equality by using the default equality comparer So essentially, something like... more
If you open up the generated C# file corresponding to that type, you'll see something like this: internal static string Hello { get { return ResourceManager.GetString("Hello", resourceCulture); } } Unless you specific... more
It should be fine so long as the machine you're copying it to has the full version of .NET - not just a client profile. You shouldn't need to copy anything - it should just be fine to pull it from the GAC. Just make sure you've got the... more
I think calling it "hiding" is misleading here, to be honest. Both methods are definitely created, but if you call: Concat(5); then for that invocation both methods are applicable (in the terminology of the C# spec section 7.5.3.1) but... more
why does the output comes 5,5? Because A.display() only knows about the fields A.a and A.b. Those are the only fields that any code in A knows about. It looks like you expect the declarations in B to "override" the existing field... more
I don't understand is how we know which class the method is extending. Is it the class that has this preceding it? Yes. It's always the first parameter of the method. You can't decorate any other parameter with this. (And it's the... more
Well, that's just not how the language is specified. It's important to understand that default is like typeof - they're operators1, not method calls. It's not like the name of the type is an argument - it's an operand, and the operand is... more
Can you do exact same thing without using that method? Actually Nope. You absolutely can. Here's a really inefficient way of doing it - which doesn't consider overflow, invalid input or negative numbers, but demonstrates the general... more
From the Mozilla documentation: If parseInt encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point. parseInt truncates... more