> For the complete documentation index, see [llms.txt](https://www.saladpuk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.saladpuk.com/beginner-1/csharp101.md).

# เขียนโค้ดด้วยภาษา C\#

## 👑 สิ่งที่ควรรู้ของภาษา C\#

* **C#** อ่านว่า **ซีชาป** นะจ๊ะเบบี๋
* บริษัทที่พัฒนาคือ **Microsoft** ที่เราใช้ **Windows** กันอยู่ทุกวันนี้แหละ
* ภาษานี้พัฒนาจากภาษา **Java แล้วปรับปรุงให้ดีกว่าเดิมเยอะมาก** ดังนั้นถ้าเข้าใจภาษานี้ปุ๊ป แทบจะเรียกว่าโดดไปเขียน **Java** ได้เลย (ภาษา Java หยุดพัฒนาไปนานม๊วกเลยขอเลือก C# มาสอนแทน **อวยๆ**)
* สามารถใช้ภาษานี้เขียนแอพได้เกือบทุกชนิดที่สุดแล้วซึ่งภาษาส่วนใหญ่จะทำไม่ได้ เช่น เขียนเว็บ, แอพมือถือ, แอพบน Windows, Mac OS, Linux, เขียนเกม บลาๆขี้เกียจไล่ละ

## 🎥 ทำไมเราควรเรียนภาษา C\#

{% embed url="<https://www.youtube.com/watch?v=ojPcwo93erc&list=PLUjAn8nwWnijERZ3HpzBk7NfSrau74_lQ&index=2>" %}

## 🧭 เนื้อหาทั้งหมดของคอร์สนี้

### 👶 พื้นฐาน

{% content-ref url="/pages/-Lm3TnID9DZ1TP0k-3KS" %}
[1.โปรแกรมที่ต้องลง](/beginner-1/csharp101/basic/tools.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lm3nfT0x0L8XqQcDcq8" %}
[2.โครงสร้างของโค้ด](/beginner-1/csharp101/basic/structure.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lm3pcuYdJ3ulEG7pSRb" %}
[3.ชนิดของข้อมูล](/beginner-1/csharp101/basic/datatype.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lm3tlPx2pI2aik6mv6h" %}
[4.การสร้างตัวแปร](/beginner-1/csharp101/basic/variable.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lm5YJJW8qp1KqD-U3Ln" %}
[5.คำสั่งพื้นฐาน](/beginner-1/csharp101/basic/operators.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lm9VWl97tXeFhHWA8Mu" %}
[6.การแปลงข้อมูล](/beginner-1/csharp101/basic/type-conversions.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmAXI9DTjy2JTo5qRCE" %}
[7.การเปรียบเทียบค่า](/beginner-1/csharp101/basic/boolean.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmYsLJ\_VQFP2DcXRVLI" %}
[8.การตัดสินใจด้วย IF statements](/beginner-1/csharp101/basic/if.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZ01LvGvurMe\_b3ejq" %}
[9.การตัดสินใจด้วย Switch statements](/beginner-1/csharp101/basic/switch.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZ4pJL72khLBT8AwNe" %}
[10.การทำงานซ้ำๆด้วย While](/beginner-1/csharp101/basic/while-loop.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZ6mjA27-Zv5tZm8L8" %}
[11.การทำงานซ้ำๆด้วย Do While](/beginner-1/csharp101/basic/do-while.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZ92E1RVvWdIULYCmU" %}
[12.การทำงานซ้ำๆด้วย For](/beginner-1/csharp101/basic/for.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZD9Ty1g37KVNCGw9i" %}
[13.การแก้โจทย์จากรูป](/beginner-1/csharp101/basic/img-solving.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZeVmNT4txF6s1WFw7" %}
[14.มารู้จักกับ Array กัน](/beginner-1/csharp101/basic/array.md)
{% endcontent-ref %}

### 🧑 ระดับกลาง

{% content-ref url="/pages/-LmZhAUyVPypU4BGd8NS" %}
[15.Value type vs Reference type](/beginner-1/csharp101/intermediate/value-vs-reference.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmZlErAuNadOG3Fc\_Xc" %}
[16.ลดงานซ้ำๆด้วย Method](/beginner-1/csharp101/intermediate/method.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lme6jrVe69vVvoEWG1Y" %}
[17.มารู้จักกับ Class & Field กัน](/beginner-1/csharp101/intermediate/class.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmeEuGF2njiervSU7oU" %}
[18.มารู้จักกับ Constructor กันบ้าง](/beginner-1/csharp101/intermediate/constructor.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmeL-j9JzAHbMJnXEGE" %}
[19.มาเขียน Method ใน Class กัน](/beginner-1/csharp101/intermediate/method-in-class.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmgNC1voN7doIHWw7Dq" %}
[20.มารู้จักกับ Property กัน](/beginner-1/csharp101/intermediate/property.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmhWCaz9E1nOiO03sue" %}
[21.ลองใช้คลาสแบบจริงจังบ้าง](/beginner-1/csharp101/intermediate/demo-class.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lmj21yC-35zV9PtxLg7" %}
[22.การสืบทอด Inheritance](/beginner-1/csharp101/intermediate/inheritance.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lmj5Ppomq2yKr82KE8t" %}
[23.Polymorphism](/beginner-1/csharp101/intermediate/polymorphism.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmqJdgCXK1x0BI01fRy" %}
[24.Abstract Class](/beginner-1/csharp101/intermediate/abstract-class.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmqQg7DubML\_gk10Hj6" %}
[25.Interface](/beginner-1/csharp101/intermediate/interface.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmqWR6e9nh6NvSKy3D1" %}
[26.Namespace](/beginner-1/csharp101/intermediate/namespace.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmqhPWkiuGrfCzbskN9" %}
[27.Enum](/beginner-1/csharp101/intermediate/enum.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmtPJTgseaPELzujxws" %}
[28.Exception handler](/beginner-1/csharp101/intermediate/exception.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lmt\_11lffOoUeiTzEI2" %}
[29.ลงลึกกับ string](/beginner-1/csharp101/intermediate/string.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lmtj2vMga7Xm2Qe-5pA" %}
[30.StringBuilder เพื่อนคู่ string](/beginner-1/csharp101/intermediate/stringbuilder.md)
{% endcontent-ref %}

### 👨 ระดับสูง

{% hint style="danger" %}
ระดับนี้กำลังค่อยๆเขียนอยู่ น่าจะเสร็จราวๆวันที่ 30/09/2019 นี้แหละ
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.saladpuk.com/beginner-1/csharp101.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
