<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by truth or dare on Medium]]></title>
        <description><![CDATA[Stories by truth or dare on Medium]]></description>
        <link>https://medium.com/@a4061476?source=rss-3aff4b74913e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EGoFBY1k2nYCTI2t.jpg</url>
            <title>Stories by truth or dare on Medium</title>
            <link>https://medium.com/@a4061476?source=rss-3aff4b74913e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 01:32:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@a4061476/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[.NET 類別封裝(class encapsulation)]]></title>
            <link>https://medium.com/@a4061476/net-%E9%A1%9E%E5%88%A5%E5%B0%81%E8%A3%9D-class-encapsulation-fdae31af33ca?source=rss-3aff4b74913e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdae31af33ca</guid>
            <dc:creator><![CDATA[truth or dare]]></dc:creator>
            <pubDate>Sun, 09 Apr 2023 07:19:36 GMT</pubDate>
            <atom:updated>2023-04-09T07:19:36.421Z</atom:updated>
            <content:encoded><![CDATA[<p>.NET class encapsulation，類別封裝 (class encapsulation) 是將數據和方法（或功能）包含在單一類別中的過程。封裝的主要目的是確保類別內部的實現細節不會被外部代碼直接存取。在 .NET 中，可以通過以下幾種存取修飾符來實現封裝：</p><ol><li>public : 公共成員，可以被任何代碼存取，在介面中未指定的存取屬性預設值為public(公共成員)。在介面（interface）中，成員的存取屬性不能明確地指定為 public、private、protected 等。介面中的成員都是隱式 public 的，而且只能是 public。換句話說，無需在介面成員上添加 public 修飾符，它們將自動成為公共成員。</li><li>private : 私有成員，僅能在該類別內部存取，在類別中未指定的存取屬性預設值為private (私有成員)。如果在類別或結構中未指定成員的存取修飾符，則預設值為 private。這意味著，如果沒有明確地為成員指定存取修飾符，它將自動成為私有成員。</li><li>protected : 受保護的成員，可以在所屬類別和該類別的子類別中存取。</li><li>internal : 內部成員，只能在同一個專案底下的類別中存取。</li><li>protected internal : 受保護內部成員，可以同一個專案底下的類別以及該類別的子類別中存取。</li><li>private protected : 私有受保護成員，只能在所屬類別和該類別的子類別中存取，但僅限於相同程序集。</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdae31af33ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[開始學C#]]></title>
            <link>https://medium.com/@a4061476/%E9%96%8B%E5%A7%8B%E5%AD%B8c-5b6d1dbff675?source=rss-3aff4b74913e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b6d1dbff675</guid>
            <dc:creator><![CDATA[truth or dare]]></dc:creator>
            <pubDate>Tue, 04 Apr 2023 06:53:04 GMT</pubDate>
            <atom:updated>2023-04-04T08:54:38.683Z</atom:updated>
            <content:encoded><![CDATA[<p>以下會記錄我學習C# Programing 歷程</p><p>為了與國際接軌我將會從C#中文編程術語，一邊調整我的學習腳步轉向為英文術語一方面精進自我使用全英文找資料，因為我覺得一直切換中文與英文很麻煩，哈哈哈哈。</p><p><strong>什麼是表達式（Expression）</strong></p><p>表達式由一系列的運算元(Operand)和運算子(Operator)組成。</p><p>Expression 可以是一個常數(constant)、一個變數(variable)、一個函式(function)呼叫、一個運算式(operation)，或是以上各種元素的組合(a combination of these elements)。</p><p><strong>Constants(常數):</strong></p><p>Constant是不可變的值，在宣告Constant，必須使用const 關鍵字(keyword)，並給它一個初始值。Constant 在程式執行期間不能被改變，Constant 通常用於固定的值。</p><p>以下是我自行練習的範例</p><p>you can use the `const` keyword followed by the string value, like this:</p><pre>const int MaxNumber = 10; //用constant 宣告一個 integer MaxNumber<br>const string MyName = &quot;Hello World&quot;; //用constant 宣告一個 string 型別</pre><p><strong>Variables(變數)</strong></p><p>Variable 可以存放各種不同的數據類型，像是 integer(整數), floating-point numbers(浮點數), Boolean values(布林值), strings(字符串)等。</p><p>以下使用Variables 的簡單加法練習</p><p>Here is an example of declaring and using variables:</p><pre>int num1 = 1; //Declare(定義)一個 integer variable，並給變數賦值<br>int num2 = 2; //Declare and assign a value to an integer variable.<br>int sum = num1 + num2; // Use variable tp perform a calculation.<br>Console.WriteLine($&quot;The sum of {num1} and {sum2} is {sum}&quot;); // Output the result using string interpolation.<br><br></pre><p><strong>Function(函式)</strong></p><p>Fuction也稱為 Method(方法)， 是一個可以被重複使用的code block(代碼塊)。Function 可以執行一系列的操作，可以傳遞參數以及返回值。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b6d1dbff675" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>