-
Notifications
You must be signed in to change notification settings - Fork 0
/
csharp.html
56 lines (54 loc) · 4.68 KB
/
csharp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Sans+Mono" />
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/octicons/3.0.1/octicons.min.css"/>
<link rel="stylesheet" type="text/css" href="main.css" />
<body><header>
<a href="index.html">maybe-hugs</a>
</header>
<nav>
<a href="bash.html">bash</a>
<a href="c.html">c</a>
<a href="cplusplus.html">c++</a>
<a href="clojure.html">clojure</a>
<a href="commonlisp.html">commonlisp</a>
<a href="csharp.html">csharp</a>
<a href="elixir.html">elixir</a>
<a href="elm.html">elm</a>
<a href="erlang.html">erlang</a>
<a href="go.html">go</a>
<a href="haskell.html">haskell</a>
<a href="hy.html">hy</a>
<a href="idris.html">idris</a>
<a href="java.html">java</a>
<a href="javascript.html">javascript</a>
<a href="ocaml.html">ocaml</a>
<a href="ocaml-cps.html">ocaml-cps</a>
<a href="perl.html">perl</a>
<a href="perl6.html">perl6</a>
<a href="php.html">php</a>
<a href="purescript.html">purescript</a>
<a href="python.html">python</a>
<a href="racket.html">racket</a>
<a href="ruby.html">ruby</a>
<a href="rust.html">rust</a>
<a href="sass.html">sass</a>
<a href="scala.html">scala</a>
</nav>
<div id="container">
<main>
<h2 id="user-content-csharp" class="deep-link"><a href="#csharp">csharp</a></h2>
<h6 id="user-content-hellohugcs" class="deep-link"><a href="#hellohugcs">HelloHug.cs</a></h6>
<pre class="editor editor-colors"><div class="line"><span class="text"><span>public class Human {</span></span></div><div class="line"><span class="text"><span>  public bool wantsHug;</span></span></div><div class="line"><span class="text"><span> </span></span></div><div class="line"><span class="text"><span>  public Human(bool wantHug) {</span></span></div><div class="line"><span class="text"><span>    wantsHug = wantHug;</span></span></div><div class="line"><span class="text"><span>  }</span></span></div><div class="line"><span class="text"><span> </span></span></div><div class="line"><span class="text"><span>  public string MaybeHug() {</span></span></div><div class="line"><span class="text"><span>    if (wantsHug) {</span></span></div><div class="line"><span class="text"><span>      return "Hug!";</span></span></div><div class="line"><span class="text"><span>    }</span></span></div><div class="line"><span class="text"><span>    return "Empathy";</span></span></div><div class="line"><span class="text"><span>  }</span></span></div><div class="line"><span class="text"><span> </span></span></div><div class="line"><span class="text"><span>}</span></span></div><div class="line"><span class="text"><span> </span></span></div><div class="line"><span class="text"><span>public class HelloHug</span></span></div><div class="line"><span class="text"><span>{</span></span></div><div class="line"><span class="text"><span>   public static void Main()</span></span></div><div class="line"><span class="text"><span>   {</span></span></div><div class="line"><span class="text"><span>     Human hugYes = new Human(true);</span></span></div><div class="line"><span class="text"><span>     Human hugNo = new Human(false);</span></span></div><div class="line"><span class="text"><span> </span></span></div><div class="line"><span class="text"><span>     System.Console.WriteLine(hugYes.MaybeHug());</span></span></div><div class="line"><span class="text"><span>     System.Console.WriteLine(hugNo.MaybeHug());</span></span></div><div class="line"><span class="text"><span>   }</span></span></div><div class="line"><span class="text"><span>}</span></span></div><div class="line"><span class="text"><span> </span></span></div></pre>
</main>
</div>
<footer>
<a href="https://github.com/zkat/maybe-hugs">
<span class="mega-octicon octicon-mark-github"></span>
</a>
<a href="http://creativecommons.org/publicdomain/zero/1.0/">
<img src="https://camo.githubusercontent.com/c5160f944848828fa33126d9a697e9abe43ea98f/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f702f7a65726f2f312e302f38387833312e706e67"/>
</a>
</footer>
<script src="bundle.js"></script>
</body>