Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> C#
C#
  1. Local Functions ใน C# 7.0 คืออะไร

    Local Functions เป็น Private Methods ของ Type ที่ Nested อยู่ใน Member อื่น สามารถเรียกได้เฉพาะจาก Containing Member เท่านั้น Local Functions สามารถ Declare และ Call ได้จาก: Methods (รวม Iterator Methods และ Async Methods) Constructors Property Accessors Event Accessors Anonymous Methods Lambda Ex

  2. Pattern Matching ใน C# 7.0 คืออะไร

    C# 7.0 Introduce Pattern Matching ใน 2 กรณี: is Expression และ switch Statement Patterns ทดสอบว่า Value มี Shape เฉพาะหรือไม่ และสามารถ Extract Information จาก Value เมื่อ Match ได้ Pattern Matching ให้ Syntax ที่ Concise มากกว่าสำหรับ Algorithms สามารถ Pattern Match บน Data Type ใดๆ ได้ แม้ Cust

  3. Binary Literals และ Digit Separators ใน C# 7.0

    Binary Literals ก่อน C# 7 เรา Assign ได้แค่ Decimal และ Hexadecimal Values ให้ Variable ใน C# 7.0 Binary Literal ถูก Introduce อนุญาตให้ Assign Binary Value ให้ Variable โดยตรง Digit Separator Digit Separator ใช้ Single Underscore (_) ใช้ภายใน Numeric Literal ใดๆ เพื่อเพิ่ม Readability (อ่านง่ายขึ้

  4. Ref Locals และ Ref Returns ใน C# 7.0 คืออะไร

    Reference Return Value อนุญาตให้ Method คืนค่า Reference ไปยัง Variable แทนที่จะคืนค่า Value Caller สามารถเลือกได้ว่าจะจัดการ Returned Variable ว่าเป็น Pass by Value หรือ Pass by Reference Caller สามารถสร้าง Variable ใหม่ที่เป็น Reference ของ Returned Value เรียกว่า Ref Local ปัญหา: Pass by Value

  5. วิธีเขียน Switch Expression ใหม่ใน C# 8.0

    Switch Expression ให้ Switch-like Semantics ใน Expression Context Switch Statement เป็น Selection Statement ที่เลือก Switch Section เดียวจาก List ของ Candidates ตาม Pattern Match กับ Match Expression Switch Statement บ่อยครั้งใช้แทน If-Else Construct ถ้า Single Expression ถูก Test กับ 3+ Condition

  6. วิธีใช้ Indexers ใน C# 8.0 (Index และ Range Operators)

    C# 8.0 Introduce Operators ใหม่สำหรับ Indexers: ^ Operator (Index from End) - คืนค่า Index ที่ Relative กับ End ของ Sequence/Collection .. Operator (Range) - ระบุ Range ของ Elements ^ Operator - Index from End วิธีที่ Concise และง่ายที่สุดในการหา Elements ตัวท้ายเทียบกับวิธีเก่า // เก่า var la

  7. Async Streams ใน C# 8.0 คืออะไร

    C# 8.0 Introduce Async Streams ซึ่ง Model Streaming Source ของ Data Data Streams บ่อยครั้ง Retrieve หรือ Generate Elements แบบ Asynchronous Code ที่ Generate Sequence สามารถใช้ yield return เพื่อ Return Elements ใน Method ที่ Declared ด้วย async Modifier เราสามารถ Consume Async Stream โดยใช้ await

  8. ข้อดีของการใช้ C# ASP.NET WebAPI

    WEB API เป็นตัวเลือกที่ดีกว่าสำหรับ Services ที่เรียบง่าย Lightweight WEB API ใช้ Text Format ใดๆ ได้รวมถึง XML และเร็วกว่า WCF ข้อหลักของ ASP.NET Web API ทำงานตาม HTTP Standards - ใช้ HTTP Verbs มาตรฐาน: GET, POST, PUT, DELETE สำหรับ CRUD Operations ทั้งหมด Support Routing สมบูรณ์ - Convention-ba

  9. วิธี Configure C# ASP.NET WebAPI ใน web.config ไฟล์

    ไม่สามารถ Configure Web API ใน web.config ได้ Web API รองรับ Code-based Configuration เท่านั้น ไม่สามารถ Configure ใน web.config File ได้ เราสามารถ Configure Web API เพื่อปรับแต่งพฤติกรรมของ Web API Hosting Infrastructure และ Components เช่น: Routes - Public Methods ของ Controller เรียกว่า Actio

  10. Parameter Binding ใน C# ASP.NET WebAPI คืออะไร

    Binding คือกระบวนการตั้งค่า Values ให้ Parameters เมื่อ Web API เรียก Controller Action Method Web API Methods มี Parameter Types ต่างๆ และวิธี Customize Binding Process: ถ้า Parameter เป็น Simple Type (int, bool, double, ฯลฯ) Web API พยายาม Get Value จาก URI (Route Data หรือ Query String) ถ้า Pa

  11. Built-in Message Handlers ใน ASP.NET WebAPI C# คืออะไร

    Message Handler คือ Class ที่รับ HTTP Request และคืน HTTP Response Message Handlers สืบทอดจาก Abstract Class HttpMessageHandler Message Handlers ให้โอกาส Process, Edit, หรือ Decline Incoming Request ก่อนถึง HttpControllerDispatcher Message Handlers Execute ก่อนใน Request Processing Pipeline จึงเป็น

  12. วิธีหาและแยกตัวเลขจาก String ใน C#

    Regular Expression เป็น Pattern ที่สามารถ Match กับ Input Text ได้ .NET Framework จัดเตรียม Regular Expression Engine สำหรับ Matching แบบนี้ Pattern ประกอบด้วย Character Literals, Operators หรือ Constructs หนึ่งหรือมากกว่า Pattern Metacharacters พื้นฐานที่ RegEx ใช้: * = Zero or more ? = Zero or o

  13. วิธีใช้ ViewBag ใน ASP.NET MVC C#

    ViewBag ใช้ Dynamic Feature ที่ Introduce ใน C# 4.0 อนุญาตให้ Object มี Properties เพิ่มได้แบบ Dynamic ภายในเป็น Dynamic Type Property ของคลาส ControllerBase ซึ่งเป็น Base Class ของ Controller Class ViewBag ส่งข้อมูลจาก Controller ไป View เท่านั้น ไม่ใช่สองทาง ViewBag Values จะเป็น Null ถ้าเกิด Red

  14. ความสำคัญของ NonActionAttribute ใน ASP.NET MVC C#

    Attribute NonAction ใช้เมื่อเราต้องการ Public Method ใน Controller แต่ไม่ต้องการให้ถือเป็น Action Method Action Method คือ Public Method ใน Controller ที่สามารถ Invoke ผ่าน URL ได้ ดังนั้น โดย Default ถ้าเรามี Public Method ใดๆ ใน Controller มันสามารถ Invoke ผ่าน URL Request ได้ เพื่อจำกัดการเข้าถึง

  15. สาม Segment ของ Default Route ใน ASP.NET MVC C# คืออะไร

    ASP.NET MVC Routing Module รับผิดชอบ Map Incoming Browser Requests ไปยัง MVC Controller Actions เฉพาะ เมื่อ ASP.NET MVC Application Launch แล้ว Application จะ Register Pattern หนึ่งหรือมากกว่ากับ Route Table ของ Framework เพื่อบอก Routing Engine ว่าจะทำอะไรกับ Request ที่ Match Patterns นั้น เมื่อ R

  16. Filter ใน ASP.NET MVC C# ใช้ได้ที่ระดับไหนบ้าง

    ระดับการใช้งาน Filter ใน ASP.NET MVC ใน ASP.NET MVC Filter สามารถนำไปใช้ได้ที่ 3 ระดับ ตามขอบเขตการทำงาน: 1. Action Method Level (ระดับ Action Method) Filter ทำงาน เฉพาะ Action Method นั้นๆ ที่ตกแต่ง Attribute using System.Web.Mvc; namespace DemoMvcApplication.Controllers { public class HomeCo

  17. การใช้งาน ChildActionOnly Attribute ใน ASP.NET MVC C#

    Child Action เข้าถึงได้เฉพาะผ่าน Child Request เท่านั้น จะไม่ตอบสนองต่อ URL Requests หากพยายามเรียกผ่าน URL จะเกิด Runtime Error: Child action is accessible only by a child request Child Action Methods สามารถ Invoke ได้โดยการสร้าง Child Request จาก View โดยใช้ HTML Helpers Action() และ RenderAction(

  18. Content Negotiation ใน ASP.NET WebAPI C# คืออะไร

    Content Negotiation (การเจรจาเนื้อหา) คือกระบวนการเลือก Representation ที่ดีที่สุดสำหรับ Response เมื่อมี Multiple Representations Available หมายถึง ขึ้นอยู่กับค่า Accept Header ใน Request Server จะส่ง Response กลับไป Mechanism หลักสำหรับ Content Negotiation ใน HTTP คือ Request Headers เหล่านี้: A

  19. การใช้งาน Authorize Attribute ใน C# ASP.NET WebAPI

    Authorization (การอนุญาต) คือกระบวนการตัดสินใจว่า Authenticated User ได้รับอนุญาตให้กระทำ Action บน Resource เฉพาะ (Web API Resource) หรือไม่ เช่น การมีสิทธิ์ Get และ Post Data เป็นส่วนหนึ่งของ Authorization กระบวนการ Authorization เกิดขึ้นก่อน Execute Controller Action Method ให้ความยืดหยุ่นตัดสินใ

  20. วิธี Consume ASP.NET WebAPI Endpoints จากแอปพลิเคชันอื่นด้วย C#

    คลาส HttpClient จัดเตรียม Base Class สำหรับส่ง/รับ HTTP Requests/Responses จาก URL รองรับ Async Feature ของ .NET Framework HttpClient สามารถประมวลผล Multiple Concurrent Requests ได้ เป็น Layer บน HttpWebRequest และ HttpWebResponse ทุก Method ของ HttpClient เป็น Asynchronous HttpClient อยู่ใน Namespa

Total 2668 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:126/134  20-คอมพิวเตอร์/Page Goto:1 120 121 122 123 124 125 126 127 128 129 130 131 132