I was reading a post about some common C# interview questions, and thought I’d share some of mine. These are questions that I asked in interviews, or was asked in past interviews. Try them out and see you how you do! I’m not going to post the answers here, if you don’t know them, find out!

Common C# (and .Net) Interview Questions
  • What are the different types of collections in .Net?

  • What are the benefits offered by generics as opposed to other collections?
  • What is the difference between a class and a struct?
  • When calling a function, are parameters passed by value or by reference?
  • What are the different ways to pass a parameter by reference?
  • What are the mechanisms for maintaining state in an asp.net application?
  • Describe inheritance. Describe different ways you can implement inheritance.
  • What is dependency injection?
  • How do you override a static method?
  • Name some of the parts of the page life cycle in ASP.NET.
  • Where I would validate something like an email address?
  • What is the difference between public, static and void?
  • What are Jagged Arrays?
  • What is serialization?
  • Can “this” be used within a static method?
  • What is the difference between Array and Arraylist?
  • Can a private virtual method be overridden?
  • Describe the accessibility modifier “protected internal”.
  • What are the differences between System.String and System.Text.StringBuilder?
  • What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
  • What’s the difference between an interface and abstract class?
  • What is the difference between Finalize() and Dispose() methods?
  • What’s an object pool?
  • What is the difference between method overriding and method overloading?
  • What is the difference between a Struct and a Class?
  • What are Indexers?
MS SQL
  • What are the different ways for storing behaviors in SQL?

  • What are the different kinds of SQL joins? When would you use each?
  • If you have a slow running query that looks at seldom changed data, how might you speed it up?
  • Describe the different types of joins?
  • What is the no-lock feature?
  • How do you make sure you maintain your referential integrity?
  • He asked me to describe the Controller?
  • What is a clustering index?
  • How do you handle an error in a SQL query?
Exercises
  • Name the 3 language features that make a programming language object-oriented.

  • Write a C# method that takes an array of integers and returns the largest integer in the array
  • Explain the difference between pass by value and pass by reference?
  • Write a C# method that will reverse a string (e.g. “abcd” -> “dcba”). Make sure that it works.
  • Write a function that tests if a string is a Palindrome
  • Write this same function recursively
  • Write a function that acts as a telegraph, that has a set limit of characters per line (for example only 20 characters per line) and break it up so you don’t split any words.
Summary

These are just a few I had stored over the years for interviews, but I’ll come up with some more. It’s always good to keep brushed up on this stuff to make sure your skill level is where you think it should be.

转自 https://www.jeremymorgan.com/blog/programming/c-sharp-interview-questions/

最新文章

  1. Appfuse:权限控制
  2. Windows Store App JavaScript 开发:获取文件和文件夹列表
  3. HTML5基础知识(1)--上标和下标文本
  4. ActiveReports 报表应用教程 (5)---解密电子商务领域首张电子发票的诞生(套打报表)
  5. (一)win7下cocos2d-x 21 + vs2010
  6. shell脚本调用spark-sql
  7. Oracle 表的连接方式(1)-----Nested loop join和 Sort merge join
  8. 局部更新 java web 的文件
  9. CSS截取字符串
  10. hdu2191 悼念512汶川大地震遇难同胞——珍惜如今,感恩生活
  11. cocos2d-x-2.2.0_win7+vs2010
  12. 路径正确下,Eclipse读取txt文件仍失败
  13. Python简单爬虫获取岗位招聘人数
  14. 扩展1000!(n!)的尾数零的个数
  15. UVALive - 3942 (字典树)
  16. es日常维护
  17. 第一章03 java 开发环境搭建
  18. C_数据结构_递归不同函数间调用
  19. fastscript例子一
  20. AJAX异步的 JavaScript

热门文章

  1. java多线程实现每隔500毫秒输出一个数字
  2. C#三层架构详细解剖
  3. js实现可拖动的布局
  4. 8.solr学习速成之FacetPivot
  5. VMware虚拟机安装Centos7详细步骤过程(图文)[转载]
  6. leetcode788
  7. Asp.Net framework 类库 自带的缓存 HttpRuntime.Cache HttpContext.Cache
  8. 通过键盘上下键 JS事件,控制候选词的选择项
  9. 【原】Coursera—Andrew Ng斯坦福机器学习(0)——课程地址和软件下载
  10. Java基础-JDK、JRE与JVM的区别