What are some must-knows for C#?
I just got offered a job interview with short notice. Tomorrow morning I'm interviewing for a positions which has C# as a required proficiency. The position is a co-op position and I'm fairly certain the company understands that incomming students will probably have very limited, if any, experience in C# especially because the local college does not offer a class in it (that's not to say people can't learn it on the side, but something to keep in mind).
I will make sure it is known开发者_JAVA百科 that I have not used C# before, but my question is this: Given what I know (listed below) what topics specific to C# should I learn that are unique to the language or perhaps drastically different from many other languages?
Languages that I feel at least comfortable with are:
- Ada
- C
- C++
- Java
- Objective-C
- Python
Since its a coop position, and you know java, they most likely won't ask many questions that are specific to C#. Most likely they will ask two types introductory type of questions - 1) programming concepts, and 2) algorithm questions
1) for programming concepts, questions like:
- object oriented programming concepts (polymorphism, abstraction, interfaces etc)
- what is the difference between public/private methods
- how to write accessor methods in C#
- what does immutable mean
- when to use regular strings vs StringBuilder
2) for algorithm question, almost all tech coop employers ask some variation of:
- how do design an algorithm to reverse a string, using a buffer and/or no buffer (eg: in place)?
C# is very close to Java, so you mostly need to learn in in terms of the differences.
Try this article.
The most important thing is not C# itself, which you should have no trouble with, but the .Net framework itself.
Here's what I'd focus on for a job interview.
Many companies picking up C# developers are taking them from a market where a large number have programmed in VB. A lot of companies - particularly those funding Agile or Lean projects, where the cost of change needs to be kept low - prefer to hire Java developers. The Java community has a larger open-source base, a tendency to program with smaller classes and better adherence to the SOLID principles, and know how to write unit tests, acceptance tests and use design patterns appropriately and effectively.
Things you already know:
- JUnit -> NUnit
- Generics -> Compile-time Generics
- Java library -> NLibrary.NET (Spring.NET, Selenium.NET, NHibernate, etc.)
New things worth picking up:
- Delegates*
- Lambdas*
- Linq*
- WPF or Silverlight (almost the same thing) - basic Xaml is interesting, fast to code, creates a lovely dynamic MVC pattern and fails almost silently (you get output warnings)
(*) These are why I prefer C# to Java these days... Microsoft platforms aside...
Things which you know about because of Java / wide language exposure and they might** not:
- Resharper (IntelliJ's refactoring shortcuts in Visual Studio)
- REST
- MVC (Winforms doesn't lend itself to this; WPF does)
- Git / Mercurial
- How to write clean, maintainable code.
(**) I said might not already!
Good luck with the interview!
In under 24 hours, there is very little you can learn about C# that would convince an interviewer that has even a slight clue that you know the language. Focus on brushing up on your own strengths (e.g.: solve some interesting algorithm problem in some language you know).
If you really want to cram, read an overview.
I understand the desire to impress with at least some smidgeon of knowledge, and it certainly can't hurt to be able to say that you've started looking into it. But as an interviewer, one of the first questions I ask is what languages the candidate is familiar with, and then proceed on that basis. I don't question them on what they know of languages they haven't used, because I know that anything they've picked up online will be superficial and largely useless in the day-to-day process of writing code. Instead, I focus entirely on a demonstration of the skills they possess in whatever language they are comfortable with. Of course, that's just my style and I can't guarantee tomorrow's interviewers will have same viewpoint. But I still think that, as a basic guiding principle, you should always play to your strengths.
With regard to language similarities, don't pay any attention to the advice that Java and C# are similar, and most certainly do not make such a claim in an interview for a C# job. While the languages may be superficially similar, with many features in common, C# has numerous modern language features that Java lacks (iterators, lambda forms, LINQ, struct, properties, expression objects, reference parameters, indexers, etc.). This leads to wildly different programming styles.
Java is your closest, and a lot of the stuff you know there will be directly applicable to C#.
The syntax is similar, and the concepts behind it are similar, such as automatic memory management, intermediate language etc.
There are obviously a few subtle differences, but if you read up on something like 'C# for Java Programmers' you should be pretty primed.
Learn why C# is different - namely the CLR.
They will probably ask you about all the keywords, like what does sealed mean? When do you override? Tell me what static is... What's the app.config used for...
But they really want you to say you have experience with SQL server, ASP, winforms, and WPF... since you're a student you probably don't have that kind of experience, but that's what they want.
I think most questions will be about:
- OOP concepts(like abstraction , encapsulation , polymorphism ,what is the difference between the interface an the abstract class?... etc)
- data structures and collections(the advantages)when to use arraylist and when to use list??
- the .net framework(may ask about what are the new in framework 3.5 or 4)
- what is the difference between managed code and unmanaged code?.
- may ask u about the LINQ.
Basic Opps Concept learn first if you are basic programmer. if you are not a basic level programmer then start with this :- csharp.2000things
精彩评论