@ -13,23 +13,24 @@
/* buutti.css */
/* buutti.css */
/* @theme buutti */div#\:\$p>svg>foreignObject>section .columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns12{display:grid;grid-template-columns:1fr 2fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns21{display:grid;grid-template-columns:2fr 1fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns32{display:grid;grid-template-columns:3fr 2fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns23{display:grid;grid-template-columns:2fr 3fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns111{display:grid;grid-template-columns:1fr 1fr 1fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .centered{display:flex;flex-direction:column;justify-content:center;text-align:center}div#\:\$p>svg>foreignObject>section .tableborderless td,div#\:\$p>svg>foreignObject>section th{border:none!important;border-collapse:collapse}div#\:\$p>svg>foreignObject>section.extra{background-color:#5d275d;background-image:linear-gradient(to bottom,#401a40,#1d0c1d);color:white}div#\:\$p>svg>foreignObject>section.extra a{color:rgb(145,255,209)}div#\:\$p>svg>foreignObject>section.exercise{background-color:#29366f;background-image:linear-gradient(to bottom,#20636a,#173742);color:white}div#\:\$p>svg>foreignObject>section.exercise a{color:rgb(211,173,255)}
/* @theme buutti */div#\:\$p>svg>foreignObject>section .columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns12{display:grid;grid-template-columns:1fr 2fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns21{display:grid;grid-template-columns:2fr 1fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns32{display:grid;grid-template-columns:3fr 2fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns23{display:grid;grid-template-columns:2fr 3fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns111{display:grid;grid-template-columns:1fr 1fr 1fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .centered{display:flex;flex-direction:column;justify-content:center;text-align:center}div#\:\$p>svg>foreignObject>section .tableborderless td,div#\:\$p>svg>foreignObject>section th{border:none!important;border-collapse:collapse}div#\:\$p>svg>foreignObject>section.extra{background-color:#5d275d;background-image:linear-gradient(to bottom,#401a40,#1d0c1d);color:white}div#\:\$p>svg>foreignObject>section.extra a{color:rgb(145,255,209)}div#\:\$p>svg>foreignObject>section.exercise{background-color:#29366f;background-image:linear-gradient(to bottom,#20636a,#173742);color:white}div#\:\$p>svg>foreignObject>section.exercise a{color:rgb(211,173,255)}
/* @theme gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr */div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}< / style > < / head > < body > < div class = "bespoke-marp-osc" > < button data-bespoke-marp-osc = "prev" tabindex = "-1" title = "Previous slide" > Previous slide< / button > < span data-bespoke-marp-osc = "page" > < / span > < button data-bespoke-marp-osc = "next" tabindex = "-1" title = "Next slide" > Next slide< / button > < button data-bespoke-marp-osc = "fullscreen" tabindex = "-1" title = "Toggle fullscreen (f)" > Toggle fullscreen< / button > < button data-bespoke-marp-osc = "presenter" tabindex = "-1" title = "Open presenter view (p)" > Open presenter view< / button > < / div > < div id = ":$p" > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "1" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
/* @theme oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl */div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}< / style > < / head > < body > < div class = "bespoke-marp-osc" > < button data-bespoke-marp-osc = "prev" tabindex = "-1" title = "Previous slide" > Previous slide< / button > < span data-bespoke-marp-osc = "page" > < / span > < button data-bespoke-marp-osc = "next" tabindex = "-1" title = "Next slide" > Next slide< / button > < button data-bespoke-marp-osc = "fullscreen" tabindex = "-1" title = "Toggle fullscreen (f)" > Toggle fullscreen< / button > < button data-bespoke-marp-osc = "presenter" tabindex = "-1" title = "Open presenter view (p)" > Open presenter view< / button > < / div > < div id = ":$p" > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "1" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h1 id = "variables-and-types" > Variables and Types< / h1 >
< h1 id = "variables-and-types" > Variables and Types< / h1 >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2" data-marpit-fragments = " 8 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2" data-marpit-fragments = " 9 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "overview" > Overview< / h2 >
< h2 id = "overview" > Overview< / h2 >
< ul >
< ul >
< li data-marpit-fragment = "1" > Variables< / li >
< li data-marpit-fragment = "1" > Variables< / li >
< li data-marpit-fragment = "2" > Data Types< / li >
< li data-marpit-fragment = "2" > Comments< / li >
< li data-marpit-fragment = "3" > Arithmetic Operators< / li >
< li data-marpit-fragment = "3" > Data Types< / li >
< li data-marpit-fragment = "4" > Increment & Decrement< / li >
< li data-marpit-fragment = "4" > Arithmetic Operators< / li >
< li data-marpit-fragment = "5" > Assignment Operators< / li >
< li data-marpit-fragment = "5" > Increment & Decrement< / li >
< li data-marpit-fragment = "6" > Strings< / li >
< li data-marpit-fragment = "6" > Assignment Operators< / li >
< li data-marpit-fragment = "7" > Character Constants< / li >
< li data-marpit-fragment = "7" > Strings< / li >
< li data-marpit-fragment = "8" > String Interpolation< / li >
< li data-marpit-fragment = "8" > Character Constants< / li >
< li data-marpit-fragment = "9" > String Interpolation< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "3" data-marpit-fragments = "4" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "3" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "3" data-marpit-fragments = "4" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "3" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "variables" > Variables< / h2 >
< h2 id = "variables" > Variables< / h2 >
< ul >
< ul >
< li data-marpit-fragment = "1" > A variable can be thought of as a name for a certain address in computer's memory
< li data-marpit-fragment = "1" > A variable can be thought of as a name for a certain address in computer's memory
@ -41,7 +42,7 @@
< li data-marpit-fragment = "4" > On more practical terms: We can assign values to named variables.< / li >
< li data-marpit-fragment = "4" > On more practical terms: We can assign values to named variables.< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "4" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "4" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "declaring-variables" > Declaring variables< / h3 >
< h3 id = "declaring-variables" > Declaring variables< / h3 >
< ul >
< ul >
< li data-marpit-fragment = "1" > Every variable declaration in C# requires the < em > < strong > type< / strong > < / em > and the < em > < strong > name< / strong > < / em > of the variable, for example:< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > int< / span > x;
< li data-marpit-fragment = "1" > Every variable declaration in C# requires the < em > < strong > type< / strong > < / em > and the < em > < strong > name< / strong > < / em > of the variable, for example:< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > int< / span > x;
@ -55,7 +56,7 @@
< / li >
< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "5" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "5" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "printing-to-console-with-consolewriteline" > Printing to console with < code > Console.WriteLine< / code > < / h3 >
< h3 id = "printing-to-console-with-consolewriteline" > Printing to console with < code > Console.WriteLine< / code > < / h3 >
< div class = 'columns' markdown = '1' >
< div class = 'columns' markdown = '1' >
< div markdown = '1' >
< div markdown = '1' >
@ -89,7 +90,7 @@ Console.WriteLine(example);
< / div >
< / div >
< / div >
< / div >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "6" data-marpit-fragments = "4" data-paginate = "true" data-class = "extra invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "extra invert" data-marpit-pagination = "6" style = "--paginate:true;--class:extra invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "6" data-marpit-fragments = "4" data-paginate = "true" data-class = "extra invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "extra invert" data-marpit-pagination = "6" style = "--paginate:true;--class:extra invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "extra-modifiers" > Extra: Modifiers< / h3 >
< h3 id = "extra-modifiers" > Extra: Modifiers< / h3 >
< ul >
< ul >
@ -103,10 +104,27 @@ one = <span class="hljs-number">2</span>; <span class="hljs-comment">// raises
< li data-marpit-fragment = "4" > Other modifiers include < em > < strong > access modifiers< / strong > < / em > introduced in < a href = "7-classes-and-objects#access-modifiers" > Lecture 7< / a > .< / li >
< li data-marpit-fragment = "4" > Other modifiers include < em > < strong > access modifiers< / strong > < / em > introduced in < a href = "7-classes-and-objects#access-modifiers" > Lecture 7< / a > .< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "7" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = "gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr" lang = "en-US" class = "invert" data-marpit-pagination = "7" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "7" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = "oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl" lang = "en-US" class = "invert" data-marpit-pagination = "7" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29" >
< h2 id = "comments" > Comments< / h2 >
< ul >
< li data-marpit-fragment = "1" > There are two basic ways to comment in C#:< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-comment" > // This is a comment< / span >
< span class = "hljs-comment" > /* This is a
multi
line
comment */< / span >
< / code > < / pre >
< / li >
< li data-marpit-fragment = "2" > Any text inside a comment will not be executed< / li >
< li data-marpit-fragment = "3" > Use comments to< br / >
a) explain your code< br / >
b) comment out actual code for testing and debugging< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "8" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = "oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl" lang = "en-US" class = "invert" data-marpit-pagination = "8" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29" >
< h2 id = "data-types" > Data types< / h2 >
< h2 id = "data-types" > Data types< / h2 >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "8" data-marpit-fragments = "6" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = "gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr" lang = "en-US" class = "invert" data-marpit-pagination = "8" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = " 9 " data-marpit-fragments = "6" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = " 9" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "what-is-a-data-type" > What is a data type?< / h3 >
< h3 id = "what-is-a-data-type" > What is a data type?< / h3 >
< ul >
< ul >
< li data-marpit-fragment = "1" > Data type tells to a computer what type of data is stored in a variable.< / li >
< li data-marpit-fragment = "1" > Data type tells to a computer what type of data is stored in a variable.< / li >
@ -123,7 +141,7 @@ one = <span class="hljs-number">2</span>; <span class="hljs-comment">// raises
< / li >
< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = " 9 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = " 9" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = " 10 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = " 10" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "primitive-data-types" > Primitive data types< / h2 >
< h2 id = "primitive-data-types" > Primitive data types< / h2 >
< table >
< table >
< thead >
< thead >
@ -181,7 +199,7 @@ one = <span class="hljs-number">2</span>; <span class="hljs-comment">// raises
< / table >
< / table >
< p > More types listed in the < a href = "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/built-in-types" > C# reference< / a > !< / p >
< p > More types listed in the < a href = "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/built-in-types" > C# reference< / a > !< / p >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 0 " data-marpit-fragments = "1" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "1 0" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 1 " data-marpit-fragments = "1" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "1 1" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "data-type-examples" > Data type examples< / h3 >
< h3 id = "data-type-examples" > Data type examples< / h3 >
< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > double< / span > airPressure = < span class = "hljs-number" > 1.2< / span > ; < span class = "hljs-comment" > // Use for most decimal numbers< / span >
< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > double< / span > airPressure = < span class = "hljs-number" > 1.2< / span > ; < span class = "hljs-comment" > // Use for most decimal numbers< / span >
< span class = "hljs-built_in" > decimal< / span > accountBalance = < span class = "hljs-number" > 1.2< / span > m; < span class = "hljs-comment" > // Use for accuracy (e.g. financial applications)< / span >
< span class = "hljs-built_in" > decimal< / span > accountBalance = < span class = "hljs-number" > 1.2< / span > m; < span class = "hljs-comment" > // Use for accuracy (e.g. financial applications)< / span >
@ -193,7 +211,7 @@ one = <span class="hljs-number">2</span>; <span class="hljs-comment">// raises
< li data-marpit-fragment = "1" > < code > char< / code > is only used for single characters, multi-character < em > < strong > strings< / strong > < / em > will be introduced in a bit.< / li >
< li data-marpit-fragment = "1" > < code > char< / code > is only used for single characters, multi-character < em > < strong > strings< / strong > < / em > will be introduced in a bit.< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 1 " data-marpit-fragments = "2" data-paginate = "true" data-class = "extra invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "extra invert" data-marpit-pagination = "1 1 " style = "--paginate:true;--class:extra invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 2 " data-marpit-fragments = "2" data-paginate = "true" data-class = "extra invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "extra invert" data-marpit-pagination = "1 2 " style = "--paginate:true;--class:extra invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "extra-casting-data-types" > Extra: Casting data types< / h2 >
< h2 id = "extra-casting-data-types" > Extra: Casting data types< / h2 >
< p > Data types can be < em > < strong > cast< / strong > < / em > to another either...< / p >
< p > Data types can be < em > < strong > cast< / strong > < / em > to another either...< / p >
@ -221,17 +239,17 @@ Console.WriteLine((<span class="hljs-built_in">decimal</span>)a + b);
< li data-marpit-fragment = "2" > < a href = "https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions" > C# Guide: Casting and type conversions< / a > < / li >
< li data-marpit-fragment = "2" > < a href = "https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions" > C# Guide: Casting and type conversions< / a > < / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 2 " data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "exercise invert" data-marpit-pagination = "1 2 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 3 " data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "exercise invert" data-marpit-pagination = "1 3 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "assignments-variables" > Assignments (variables)< / h2 >
< h2 id = "assignments-variables" > Assignments (variables)< / h2 >
< p > < a href = "https://gitea.buutti.com/education/academy-assignments/src/branch/master/C%23%20Basics/2.1.%20Variables%20&%20Types" > Assignments about this topic can be found here< / a > < / p >
< p > < a href = "https://gitea.buutti.com/education/academy-assignments/src/branch/master/C%23%20Basics/2.1.%20Variables%20&%20Types" > Assignments about this topic can be found here< / a > < / p >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 3 " data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "exercise invert" data-marpit-pagination = "1 3 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 4 " data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "exercise invert" data-marpit-pagination = "1 4 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "assignments-data-types" > Assignments (data types)< / h2 >
< h2 id = "assignments-data-types" > Assignments (data types)< / h2 >
< p > < a href = "https://gitea.buutti.com/education/academy-assignments/src/branch/master/C%23%20Basics/2.2.%20Data%20Types" > Assignments about this topic can be found here< / a > < / p >
< p > < a href = "https://gitea.buutti.com/education/academy-assignments/src/branch/master/C%23%20Basics/2.2.%20Data%20Types" > Assignments about this topic can be found here< / a > < / p >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 4 " data-marpit-fragments = "7" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "1 4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 5 " data-marpit-fragments = "7" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "1 5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "arithmetic-operations" > Arithmetic operations?< / h2 >
< h2 id = "arithmetic-operations" > Arithmetic operations?< / h2 >
< ul >
< ul >
< li data-marpit-fragment = "1" > < em > < strong > Arithmetic operations< / strong > < / em > are common mathematical operations:
< li data-marpit-fragment = "1" > < em > < strong > Arithmetic operations< / strong > < / em > are common mathematical operations:
@ -246,7 +264,7 @@ Console.WriteLine((<span class="hljs-built_in">decimal</span>)a + b);
< li data-marpit-fragment = "7" > The operations are represented by < strong > < em > arithmetic operators< / em > < / strong > < / li >
< li data-marpit-fragment = "7" > The operations are represented by < strong > < em > arithmetic operators< / em > < / strong > < / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 5 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "1 5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 6 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "1 6" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "arithmetic-operators" > Arithmetic Operators< / h2 >
< h2 id = "arithmetic-operators" > Arithmetic Operators< / h2 >
< table >
< table >
< thead >
< thead >
@ -303,7 +321,7 @@ Console.WriteLine((<span class="hljs-built_in">decimal</span>)a + b);
< / tbody >
< / tbody >
< / table >
< / table >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 6 " data-marpit-fragments = "3" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "exercise invert" data-marpit-pagination = "1 6 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 7 " data-marpit-fragments = "3" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "exercise invert" data-marpit-pagination = "1 7 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "exercise-1-trying-out-variables" > Exercise 1: Trying Out Variables< / h2 >
< h2 id = "exercise-1-trying-out-variables" > Exercise 1: Trying Out Variables< / h2 >
< ol >
< ol >
@ -312,7 +330,7 @@ Console.WriteLine((<span class="hljs-built_in">decimal</span>)a + b);
< li data-marpit-fragment = "3" > Print the sum, difference, fraction and product of those values to the console.< / li >
< li data-marpit-fragment = "3" > Print the sum, difference, fraction and product of those values to the console.< / li >
< / ol >
< / ol >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 7 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "1 7" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 8 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "1 8" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "the-assignment-operator" > The assignment operator< / h2 >
< h2 id = "the-assignment-operator" > The assignment operator< / h2 >
< p > We have used the assignment operator < code > =< / code > for assigning values for variables:< / p >
< p > We have used the assignment operator < code > =< / code > for assigning values for variables:< / p >
< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > int< / span > x;
< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > int< / span > x;
@ -326,7 +344,7 @@ x = <span class="hljs-number">25</span>;
< / li >
< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 8 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "1 8" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1 9 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "1 9" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "assignment-operators" > Assignment operators< / h3 >
< h3 id = "assignment-operators" > Assignment operators< / h3 >
< div class = 'columns' markdown = '1' >
< div class = 'columns' markdown = '1' >
< div markdown = '1' >
< div markdown = '1' >
@ -380,7 +398,7 @@ x = <span class="hljs-number">25</span>;
< / div >
< / div >
< / div >
< / div >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = " 19 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = " 19" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = " 20 " data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = " 20" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "assignment-operators-an-example" > Assignment operators: An example< / h3 >
< h3 id = "assignment-operators-an-example" > Assignment operators: An example< / h3 >
< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > int< / span > uppercaseLetters = < span class = "hljs-number" > 2< / span > ;
< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > int< / span > uppercaseLetters = < span class = "hljs-number" > 2< / span > ;
uppercaseLetters += < span class = "hljs-number" > 4< / span > ; < span class = "hljs-comment" > // is now 6< / span >
uppercaseLetters += < span class = "hljs-number" > 4< / span > ; < span class = "hljs-comment" > // is now 6< / span >
@ -392,7 +410,7 @@ Console.WriteLine(uppercaseLetters);
Console.WriteLine(specialCharacters);
Console.WriteLine(specialCharacters);
< / code > < / pre >
< / code > < / pre >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 0 " data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2 0" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 1 " data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2 1" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "increment-and-decrement-operations" > Increment and decrement operations< / h3 >
< h3 id = "increment-and-decrement-operations" > Increment and decrement operations< / h3 >
< ul >
< ul >
< li data-marpit-fragment = "1" > You can increment or decrement a variable value by 1 with dedicated short-hands
< li data-marpit-fragment = "1" > You can increment or decrement a variable value by 1 with dedicated short-hands
@ -429,7 +447,7 @@ a--; <span class="hljs-comment">// a is now 0</span>
< li data-marpit-fragment = "5" > < code > ++< / code > and < code > --< / code > are called the < em > < strong > increment and decrement operators< / strong > < / em > < / li >
< li data-marpit-fragment = "5" > < code > ++< / code > and < code > --< / code > are called the < em > < strong > increment and decrement operators< / strong > < / em > < / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 1 " data-marpit-fragments = "3" data-paginate = "true" data-class = "extra invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "extra invert" data-marpit-pagination = "2 1 " style = "--paginate:true;--class:extra invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 2 " data-marpit-fragments = "3" data-paginate = "true" data-class = "extra invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "extra invert" data-marpit-pagination = "2 2 " style = "--paginate:true;--class:extra invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "extra-incrementdecrement-operation-precedence" > Extra: Increment/decrement operation precedence< / h3 >
< h3 id = "extra-incrementdecrement-operation-precedence" > Extra: Increment/decrement operation precedence< / h3 >
< ul >
< ul >
@ -460,7 +478,7 @@ so its value is 3</p>
< / div >
< / div >
< / div >
< / div >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 2 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2 2" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 3 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2 3" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "strings" > Strings< / h2 >
< h2 id = "strings" > Strings< / h2 >
< ul >
< ul >
< li data-marpit-fragment = "1" > < code > string< / code > is a special type that contains an array of characters.< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > string< / span > name = < span class = "hljs-string" > " Sini Aalto" < / span > ;
< li data-marpit-fragment = "1" > < code > string< / code > is a special type that contains an array of characters.< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > < span class = "hljs-built_in" > string< / span > name = < span class = "hljs-string" > " Sini Aalto" < / span > ;
@ -476,7 +494,7 @@ Console.WriteLine(fullName); <span class="hljs-comment">// Outputs "Sini
< / li >
< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 3 " data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2 3" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 4 " data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2 4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "character-constants" > Character Constants< / h3 >
< h3 id = "character-constants" > Character Constants< / h3 >
< ul >
< ul >
< li data-marpit-fragment = "1" > Character constants are preceded by a backslash < code > \< / code > and can be used for formatting strings< / li >
< li data-marpit-fragment = "1" > Character constants are preceded by a backslash < code > \< / code > and can be used for formatting strings< / li >
@ -495,7 +513,7 @@ Kantola
< li data-marpit-fragment = "3" > All character constants are listed < a href = "https://www.tutorialspoint.com/csharp/csharp_constants.htm" > here< / a > < / li >
< li data-marpit-fragment = "3" > All character constants are listed < a href = "https://www.tutorialspoint.com/csharp/csharp_constants.htm" > here< / a > < / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 4 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2 4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 5 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2 5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "string-interpolation" > String Interpolation< / h3 >
< h3 id = "string-interpolation" > String Interpolation< / h3 >
< ul >
< ul >
< li data-marpit-fragment = "1" > Concatenating multiple variables into one string with the < code > +< / code > operator quickly becomes tedious< / li >
< li data-marpit-fragment = "1" > Concatenating multiple variables into one string with the < code > +< / code > operator quickly becomes tedious< / li >
@ -508,7 +526,7 @@ Console.WriteLine(<span class="hljs-string">$"<span class="hljs-subst">{ani
< / li >
< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 5 " data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2 5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 6 " data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2 6" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h3 id = "string-formatting" > String Formatting< / h3 >
< h3 id = "string-formatting" > String Formatting< / h3 >
< ul >
< ul >
< li data-marpit-fragment = "1" > You can add < em > < strong > format strings< / strong > < / em > to change the way variables are interpolated into a string< / li >
< li data-marpit-fragment = "1" > You can add < em > < strong > format strings< / strong > < / em > to change the way variables are interpolated into a string< / li >
@ -520,7 +538,7 @@ Console.WriteLine(<span class="hljs-string">$"Pi to three digits: <span cla
< / li >
< / li >
< / ul >
< / ul >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 6 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "invert" data-marpit-pagination = "2 6" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 7 " data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "invert" data-marpit-pagination = "2 7" style = "--paginate:true;--class:invert;--heading-divider:5;--theme:oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "user-input-with-consolereadline" > User input with < code > Console.ReadLine()< / code > < / h2 >
< h2 id = "user-input-with-consolereadline" > User input with < code > Console.ReadLine()< / code > < / h2 >
< div class = 'columns21' markdown = '1' >
< div class = 'columns21' markdown = '1' >
< div markdown = '1' >
< div markdown = '1' >
@ -537,7 +555,7 @@ Console.WriteLine(userInput);
< / div >
< / div >
< / div >
< / div >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 7 " data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "exercise invert" data-marpit-pagination = "2 7 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 8 " data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "exercise invert" data-marpit-pagination = "2 8 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "exercise-2-weekday-survey" > Exercise 2: Weekday survey< / h2 >
< h2 id = "exercise-2-weekday-survey" > Exercise 2: Weekday survey< / h2 >
< ol >
< ol >
@ -545,7 +563,7 @@ Console.WriteLine(userInput);
< li data-marpit-fragment = "2" > Print < code > Have a nice < weekday> < / code > to the console where < code > < weekday> < / code > is replaced with the string the user wrote.< / li >
< li data-marpit-fragment = "2" > Print < code > Have a nice < weekday> < / code > to the console where < code > < weekday> < / code > is replaced with the string the user wrote.< / li >
< / ol >
< / ol >
< / section >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 8 " data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr " lang = "en-US" class = "exercise invert" data-marpit-pagination = "2 8 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: gzapc67wmn4x4juhe1pf75x6urrixfh4arwl4efckrr;" data-marpit-pagination-total = "28 ">
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2 9 " data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl " lang = "en-US" class = "exercise invert" data-marpit-pagination = "2 9 " style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: oycqwo2imspp4a3ntzxl6ko6u92i15xqrdqfd7tfo1gl;" data-marpit-pagination-total = "29 ">
< h2 id = "assignments-arithmetic-operations" > Assignments (arithmetic operations)< / h2 >
< h2 id = "assignments-arithmetic-operations" > Assignments (arithmetic operations)< / h2 >
< p > < a href = "https://gitea.buutti.com/education/academy-assignments/src/branch/master/C%23%20Basics/2.3.%20Arithmetic%20Operations" > Assignments about this topic can be found here< / a > < / p >
< p > < a href = "https://gitea.buutti.com/education/academy-assignments/src/branch/master/C%23%20Basics/2.3.%20Arithmetic%20Operations" > Assignments about this topic can be found here< / a > < / p >