<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>نوشته های نیوشا حمیدی</title>
        <link>https://virgool.io/feed/@m_37697958</link>
        <description></description>
        <language>fa</language>
        <pubDate>2026-06-17 02:22:20</pubDate>
        <image>
            <url>https://files.virgool.io/upload/users/4079941/avatar/LeI6QY.jpg?height=120&amp;width=120</url>
            <title>نیوشا حمیدی</title>
            <link>https://virgool.io/@m_37697958</link>
        </image>

                    <item>
                <title>Share my programing experience in c#, C++</title>
                <link>https://virgool.io/@m_37697958/share-my-programing-experience-in-c-c-jopjbhmkj9eb</link>
                <description>when do I need Thread? whats that?...با دروددر این بلاگ تجربه ای راجب اینکه آیا در برنامه ام نیازی به ترد دارم یا نه را به اشتراک گذاشته ام:در ادامه کد مربوط به الگوریتم رمز گذاری سزار را با زبان c# می نویسم. در این برنامه ابتدا متن را از فایلی خوانده و الگوریتم را بر روی آن با تعداد شیفت 3 می نویسم.&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;
namespace CaesarCiper
{
    public partial class Form1 : Form
    {
        String line;
        StringBuilder stb, stbS;
        string[] lineWords;
        public Form1()
        {
            InitializeComponent();
        }
        private void btnStart_Click(object sender, EventArgs e)
        {
            ReadFileToStringBuilder();
            doCaesarCiper();
        }
        private void ReadFileToStringBuilder()
        {
            try
            {
                //Pass the file path and file name to the StreamReader constructor
                StreamReader sr = new StreamReader(&quot;D:\\project\\testCaesar\\ceasar.txt&quot;);
                //Read the first line of text
                stb = new StringBuilder(sr.ReadToEnd());
                sr.Close();

                txtFile.Text = stb.ToString(); 
            }
            catch (Exception e)
            {
                txtMsg.Text = &quot;Exception: &quot; + e.Message;
            }
            finally
            {
                txtMsg.Text += &quot;finally: \n&quot;;
            }

        }
        private void doCaesarCiper()
        {
            stbS = new StringBuilder();
            int nShift = 3;
            int i = 0;
            Char ch;
            while (i &lt; stb.Length)
            {
                ch = stb[i];
                if (Char.IsLetter(stb[i]))
                {
                    if (Char.IsUpper(stb[i]))
                    {
                        ch = (Char)(((int)stb[i] + nShift - 65) % 26 + 65);
                    }
                    else if (Char.IsLetter(stb[i]) &amp;&amp; Char.IsLower(stb[i]))
                    {
                        ch = (Char)(((int)stb[i] + nShift - 97) % 26 + 97);
                    }
                   
                }
                i++;

                stbS.Append(ch);
            }
            txtsecured.Text = stbS.ToString();
            txtMsg.Text += &quot;doCaesarCiper:\n &quot;;
            Thread.Sleep(2000);
        }
        private void ReadFile&#40;&#41;
        {
            try
            {
                //Pass the file path and file name to the StreamReader constructor
                StreamReader sr = new StreamReader(&quot;D:\\project\\testCaesar\\ceasar.txt&quot;);
                //Read the first line of text
                line = sr.ReadLine();
                //Continue to read until you reach end of file
                while (line != null)
                {
                    //write the line to console window
                    txtFile.Text += line;
                    //Read the next line
                    line = sr.ReadLine();
                    // lineWords = line.Split(&#039; &#039;);
                }
                //close the file
                sr.Close();
                Console.ReadLine();
                txtMsg.Text += &quot;Read Finished \n&quot;;
            }
            catch (Exception e)
            {
                txtMsg.Text = &quot;Exception: &quot; + e.Message;
            }
            finally
            {
                txtMsg.Text += &quot;finally: \n&quot;;
            }
            Thread.Sleep(2000);
        }

    }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
                <category>نیوشا حمیدی</category>
                <author>نیوشا حمیدی</author>
                <pubDate>Sat, 21 Jun 2025 13:07:37 +0330</pubDate>
            </item>
            </channel>
</rss>