see for dotnet interview questions

C

Chris Tacke, eMVP

Suspect info. The second question in the first link is this:

Is it possible to have different access modifiers on the get/set methods of
a property?

And the answer given in "No" which is complete crap. In fact this is
perfectly valid:

public int MyProperty { private set; get; }

Based on that, I'd say there's zero reason to trust any info in these links.
At least it's not complete spam (just a boatload of adwords on the target
page).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
S

Simon Hart [MVP]

Is it possible to have different access modifiers on the get/set methods of
a property?

And the answer given in "No" which is complete crap. In fact this is
perfectly valid:

public int MyProperty { private set; get; }

It depends on what version of C# the question is talking about. If version 1
then the answer is correct. If version 2 or later then the answer is wrong. I
suspect it is talking about ver 1 because of this question:
Does C# support templates?
No. However, there are plans for C# to support a type of template known as a >generic. These generic types have similar syntax but are instantiated at run time >as opposed to compile time. You can read more about them here.

Here the question seems to be comparing templated classes in C++ to generics
in C# 2.0 and onwards. So this question is also correct if the assumption is
C# ver 1 in question which is probably the case.

So it seems these questions are only almost 3 years old! :) Also pointless
reading these questions if you ask me. You either know the language or you
don't. As the title suggests they are geared towards interviewees, any good
technical person interviewing will see straight through this if the
interviewee is weak.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top