String overflowing when concatting
<p>I'm trying to make a program packer but i always fail because when i concat three strings(one contains prefix of source, one contains executable content, other contains suffix of source) content overflows into suffix. Code:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
using System.IO;
using System.IO.Compression;

namespace ProgramPacker
{
    public partial class Form1 : Form
    {
        static string prefix = @"using System;
using System.Collections.Generic;
using System.Text; 
using System.IO; 

namespace ProgramPacker 
{ 
    class Program 
    { 
        static string inside = @" + "\"";
        static string suffix = "\";\n" + @"static void Main(string[] args) 
        { 
            string temp = Path.GetRandomFileName() +" + "\"" + @".exe" + "\"" + @";
            BinaryWriter sw = new BinaryWriter(new FileStream(temp, FileMode.Create));
            sw.Write(inside);
            sw.Flush();
            sw.Close();
            System.Diagnostics.Process.Start(temp); 
        } 
    } 
}";
    public string code = "";
    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        openFileDialog1.ShowDialog();
        BinaryReader br = new BinaryReader(new FileStream(openFileDialog1.FileName, FileMode.Open));
        byte[] data = new byte[br.BaseStream.Length];
        br.Read(data, 0, (int)br.BaseStream.Length);
        br.Close();
        string inside = Encoding.UTF7.GetString(data);
        code = string.Concat(prefix, string.Concat(inside, suffix));
    }

    private void button2_Click(object sender, EventArgs e)
    {
        Console.Write(code);
        CSharpCodeProvider cs = new CSharpCodeProvider();
        ICodeCompiler compile = cs.CreateCompiler();
        CompilerParameters param = new CompilerParameters();
        param.GenerateInMemory = false;
        param.ReferencedAssemblies.Add("mscorlib.dll");
        param.ReferencedAssemblies.Add("System.dll");
        param.ReferencedAssemblies.Add("System.Core.dll");
        param.GenerateExecutable = true;
        param.OutputAssembly = Environment.CurrentDirectory + "/a.exe";
        param.WarningLevel = 4;
        CompilerResults comp = compile.CompileAssemblyFromSource(param, code);
        foreach (CompilerError error in comp.Errors)
        {
            MessageBox.Show(error.Line + " " + error.Column + " "  + error.ErrorText);
        }
        MessageBox.Show(comp.PathToAssembly);
        MessageBox.Show("Finish!");
    }
}
</code></pre>

<p>}</p>

<p>It outputs:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Text; 
using System.IO; 

namespace ProgramPacker
{ 
    class Program 
    { 
        static string inside = @"?ãÎoüoy±ôãøÿ?ÿQÔh¦Rt!?^ÿyóë=G:Fÿ»??¿Ç/}òKÿ?úõßû3õMù?c·?Äûòëoª?À_Û&gt;LÖïá^öÿ·õ©üüòcÊ?ª??÷Ô?î:^È¯ÏäG¶?ù ?ñË?oñëy:ôã7??ò@ÚyN?w¿=?ëÆ÷ëÛßTëºÓ»yßüø]áå{ö/àïªêL©Oÿ;ú5rù% ä¸?1)Ï?¥?y®ÿ]0QL8û×ÖGòów±?øÿÃ¨ü[?ª~éá¿ÿó£üüJ~Ü¹
Êw¡h??/?úçeñÈ_?¿?ü½L^ywü7?,ùÅû¿ß£ó÷w?É~Ç????ê?ÿQÌyç¿??¹Cö×vZ__&gt;?? ûïx?_ü"õ!ì; ;ùõåÇ?ú3*­¿   @ÿV?èÿ¿Ë??/½P¶y?â¡??ùñÿÑæä/A¶_ò?v??ÿ?ÿQtÄx÷w?O'N?u$ÿk÷U«yÆò?£.Y?ùw(?ßÔ6ÿ]2ÿeUÆò¿?Ø¶ö·ßO~ü#*y£Jæ·Ä w yóYëï´
õ}y¡ä¨ù÷YPdú?Z©Óé¼R?æg?ÀSyàì¬½Éÿ­ûÁ?ym&gt;ut?ÿA??&gt;?¿[ôçF ê´)9ß9xÿ£¿?
åùïyí ÁTlù
-ùñ?Òÿ·!·
E?£üO5÷]çºy?7Áè¿?Zô?(å§
#ü¥úõ®?o«âû]0Èßä7¿à??¿õ?d?Ñµ;Jü_K?úAMìT&gt;Àü1mR0sâ¿ê¨õ{äö×ó??¿.úÿõ½Eä?ÔïÿÎÿ±³v'ÿûìw ?»oÃø1±WtB
É¡wì&amp;øuå£Îÿ?Éw?|úWÿ=ö÷_ÿ·?y®YWöwû¿ßß?Öe'û?%?yß/×Àî-yÿ.?8åóù?ûÇÚ6ÿÂßøï?Áàï?{8Zy?¿Å5yø    ÇpÏ9=ó»üÑ&gt;Õ?Èÿ?Y¿,?ëÿ?Êçÿì_}E?÷Ûú|î$ò÷ø}Jÿ^Êtò¿?@á|ò{Ø`&lt;ªÿQ?QLæ½õo)¿ü&amp;¿áÂÿ¼ó¿_÷7yMå8)¿Ùo'¿õ±üü=~#LÚ¿ó§¢Ë÷üO?Æ?å÷WJÍ$¾¸øW?A?Òÿ(09Áÿà³_ëÿù3l?SWYµßô÷¤~?ÀG¿ñ
??Às%ÍyÑ;Ò¸!ÿ?_Iÿ¼¼í/Ôrö
?T´ôÑùyÇ¹ßE~üV?ñ¿C~VßùuÿG   X8|._¼Å_:Æü-?îü:?øì?|W  ¤ÃÓW01?$å×?Û#ùIÿû·1:4û½ü._y^òÙNó?º1?ßIÍ?ÿ¿ß_~|ÖùX?@?në_B?¡µ~_×ãÿhãèïØÏßì¡yïôk_y;HÿÛyÿàâ/sÀ??? $ìw0Jüßü«@?ûo?¿îËX
´úÏ?Æ?Y&gt;øçÿFpyÅÿèËöyK¡²Ì`}ù½Ò¿íÿÀñn"?Í?ëOëi»ò¹Î~çÿ?_òüîÿh£ôáêDøÏÿ¶?ç·fy ÄúçÿÖÿ?yÿ?¿?ã0ÿ¿Ë÷åå?ÿQ|ü/ü9¿?÷×Hè×ÉÏ#õ??æ?ÿâ?x?ß?5µ}~Øy¾ß^øè{¿
y{íü;Òÿ¿óú7¤¡î?»    yû?ÀÓøiP?ÿÀ_ôK?Gëªíá@??ú%íwS×ñ¿¨#Û¦ÿÿÛªy\]¼÷Z~yR~ü¶ÿ£hû???ÇãÿQVèÿ©?÷{O?Gë¬ ??¡ø\«L` æcëí¿ ½?»?ü?oë¼Ätÿ&gt;ò÷£­_¯ÖiÄ?¯ÿÓ¿÷Ï?(c¦äàéûèó?ü£´çÕè4üy_
r?qÆ¿ø'?KÿÀ_ó×xùkÔ¿FõkÌ~õ¯1y5Ú_ã'??n~â×¨~å¯ñkü»¿Æø×Ø±ÿÿ5~?_ã7ø5~Í_ã?Z4ÔrñkL~ò×¸?5Òßûÿ??ñïñnQ¦?yYÕò³vÇ;¥ùrZÍ?åÅg}õæÙöÁGiÓfËYVVËü³®óæ£ßãè7NgM?/&amp;åuJrustInfo&gt;
&lt;/assembly&gt;
; 
        } 
    } 
}
</code></pre>

<p>Any help?</p>

<p>EDIT: <strong>Why is everyone down-voting? I just asked a question.</strong></p>
