Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

C#

Format Double

double d = 123.123456789;
d.tostring("F")  // 123.12
https://snipt.net/embed/1f5b40b6339f4bf629a7cb80daa5cda3/
https://snipt.net/raw/1f5b40b6339f4bf629a7cb80daa5cda3/
1f5b40b6339f4bf629a7cb80daa5cda3
csharp
C#
2
2016-12-04T18:26:40
True
False
False
/api/public/snipt/26043/
format-double
<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></span><span id="L-1"><a name="L-1"></a><span class="kt">double</span> <span class="n">d</span> <span class="p">=</span> <span class="m">123.123456789</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="n">d</span><span class="p">.</span><span class="n">tostring</span><span class="p">(</span><span class="s">&quot;F&quot;</span><span class="p">)</span> <span class="c1">// 123.12</span> </span></pre></div> </td></tr></table>
c#, double, netduino, number, string

C#

Netduino Print ip address

	Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress);
https://snipt.net/embed/f1f85b75a29c06d66be036be91683240/
https://snipt.net/raw/f1f85b75a29c06d66be036be91683240/
f1f85b75a29c06d66be036be91683240
csharp
C#
1
2016-11-30T21:53:03
True
False
False
/api/public/snipt/26028/
print-ip-address
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a> <span class="n">Debug</span><span class="p">.</span><span class="n">Print</span><span class="p">(</span><span class="n">Microsoft</span><span class="p">.</span><span class="n">SPOT</span><span class="p">.</span><span class="n">Net</span><span class="p">.</span><span class="n">NetworkInformation</span><span class="p">.</span><span class="n">NetworkInterface</span><span class="p">.</span><span class="n">GetAllNetworkInterfaces</span><span class="p">()[</span><span class="m">0</span><span class="p">].</span><span class="n">IPAddress</span><span class="p">);</span> </span></pre></div> </td></tr></table>
"network info", netduino
Copyrighted, illegal, or inappropriate content? Email [email protected].