C#英文面試常見問題[轉]

来源:http://www.cnblogs.com/czytcn/archive/2017/12/21/8080336.html
-Advertisement-
Play Games

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 ... ...


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/


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 小知識點總結 一、Python2與Python3 的區別 1、Python2中可以加括弧輸出,也可不加輸出 Python3中必須加 2、python2 中有xrange(生成器)也有range python3中只有range 3、python2中的input為raw_input python3 中為 ...
  • 其實是:jsonmappingexception:no serializer found for class 由於後臺錯誤堆棧列印很快,只看到illegalStateException:stream 需要細心調試debug. 原因:與response 的geOutputStream out.getW ...
  • 很長一段時間以來,我都在思考如何在ASP.NET Core的框架下,實現一套完整的事件驅動型架構。這個問題看上去有點大,其實主要目標是為了實現一個基於ASP.NET Core的微服務,它能夠非常簡單地訂閱來自於某個渠道的事件消息,並對接收到的消息進行處理,於此同時,它還能夠向該渠道發送事件消息,以便... ...
  • 語句是過程式編程語言的基礎構造,對應於程式命令,通常按照指定順序執行。S#語句與C#語句基本相同,如有var, eval, if, switch, for, foreach, do, while, return, continue, break, load, using等語句。C/C++/Java/... ...
  • 一Socket介紹: 網路上的兩個程式通過一個雙向的通信連接實現數據的交換,這個連接的一端稱為一個socket。 建立網路通信連接至少要一對埠號(socket)。socket本質是編程介面(API),對TCP/IP的封裝,TCP/IP也要提供可供程式員做網路開發所用的介面,這就是Socket編程接 ...
  • using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Remoting.Messaging; using System.Text; using System.Threading;... ...
  • 三層架構,我們一般說的三層架構通常指的是:1、表現層(UI):就是展現給用戶的界面,無論是網站前臺還是應用程式界面;2、業務邏輯層(BLL):針對具體問題的邏輯操作;3、數據訪問層(DAL):對數據進行操作。其他的層級基本都是在這三層之上的補充。 UI(User Interface)表示層: 就是我 ...
  • 本示例學習如何閱讀有多個await方法方法時,程式的實際流程是怎麼樣的,理解await的非同步調用 。 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...