snipt

Ctrl+h for KB shortcuts

Text only

ILMerge .NET 4.0

c:\>ilmerge assembly1.dll assembly1.dll application.exe /out:App.exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\
v4.0.30319
https://snipt.net/embed/47858c8ce12ce41f7c74c457e9657f14/
https://snipt.net/raw/47858c8ce12ce41f7c74c457e9657f14/
47858c8ce12ce41f7c74c457e9657f14
text
Text only
2
2016-09-21T23:23:48
True
False
False
Dec 28, 2013 at 01:07 PM
/api/public/snipt/102811/
ilmerge-net-40
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>c:\&gt;ilmerge assembly1.dll assembly1.dll application.exe /out:App.exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\ </span><span id="L-2"><a name="L-2"></a>v4.0.30319 </span></pre></div> </td></tr></table>
.net, c#, ilmerge

C#

C# - Encriptacion

1
2
3
4
5
string a = "A12345";
string b = Convert.ToBase64String(Encoding.Unicode.GetBytes(a));
MessageBox.Show("Este es el parametro encriptado" + b.ToString());
string c = Encoding.Unicode.GetString(Convert.FromBase64String(b));
MessageBox.Show("Este es el parametro desencriptado" + c.ToString());
https://snipt.net/embed/427a01ab62ff18e84e7d5c71caa63b38/
https://snipt.net/raw/427a01ab62ff18e84e7d5c71caa63b38/
427a01ab62ff18e84e7d5c71caa63b38
csharp
C#
5
2016-09-21T23:17:29
True
False
False
Mar 13, 2013 at 10:00 AM
/api/public/snipt/57543/
c-encriptacion
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="kt">string</span> <span class="n">a</span> <span class="p">=</span> <span class="s">&quot;A12345&quot;</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="kt">string</span> <span class="n">b</span> <span class="p">=</span> <span class="n">Convert</span><span class="p">.</span><span class="n">ToBase64String</span><span class="p">(</span><span class="n">Encoding</span><span class="p">.</span><span class="n">Unicode</span><span class="p">.</span><span class="n">GetBytes</span><span class="p">(</span><span class="n">a</span><span class="p">));</span> </span><span id="L-3"><a name="L-3"></a><span class="n">MessageBox</span><span class="p">.</span><span class="n">Show</span><span class="p">(</span><span class="s">&quot;Este es el parametro encriptado&quot;</span> <span class="p">+</span> <span class="n">b</span><span class="p">.</span><span class="n">ToString</span><span class="p">());</span> </span><span id="L-4"><a name="L-4"></a><span class="kt">string</span> <span class="n">c</span> <span class="p">=</span> <span class="n">Encoding</span><span class="p">.</span><span class="n">Unicode</span><span class="p">.</span><span class="n">GetString</span><span class="p">(</span><span class="n">Convert</span><span class="p">.</span><span class="n">FromBase64String</span><span class="p">(</span><span class="n">b</span><span class="p">));</span> </span><span id="L-5"><a name="L-5"></a><span class="n">MessageBox</span><span class="p">.</span><span class="n">Show</span><span class="p">(</span><span class="s">&quot;Este es el parametro desencriptado&quot;</span> <span class="p">+</span> <span class="n">c</span><span class="p">.</span><span class="n">ToString</span><span class="p">());</span> </span></pre></div> </td></tr></table>
"encriptacionm encrypt", .net, c#, csharp

C#

Return the current method/Module/Page name in c#

1
2
3
//	Useful for error trapping etc to return what method failed etc..

this.GetType().FullName
https://snipt.net/embed/198f3c4d26821443017cd98198277f88/
https://snipt.net/raw/198f3c4d26821443017cd98198277f88/
198f3c4d26821443017cd98198277f88
csharp
C#
3
2016-09-24T10:15:20
True
False
False
/api/public/snipt/48577/
return-the-current-methodmodulepage-name-in-c
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c1">// Useful for error trapping etc to return what method failed etc..</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">this</span><span class="p">.</span><span class="n">GetType</span><span class="p">().</span><span class="n">FullName</span> </span></pre></div> </td></tr></table>
.net, c#
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.