{"id":4313,"date":"2018-08-29T08:00:05","date_gmt":"2018-08-29T07:00:05","guid":{"rendered":"https:\/\/code-maze.com\/?p=4313"},"modified":"2023-01-18T09:21:26","modified_gmt":"2023-01-18T08:21:26","slug":"csharp-methods","status":"publish","type":"post","link":"https:\/\/code-maze.com\/csharp-methods\/","title":{"rendered":"C# Methods"},"content":{"rendered":"<p>In this article, we are going to learn more about methods. We are going to learn how to use methods in C#, what is the method signature, and how to use parameters and arguments.<\/p>\n<div style=\"padding: 20px; border-left: 5px #dc2323 solid; display: block; margin-bottom: 20px; box-shadow: 1px 1px 5px 0px lightgrey;\">If you want to download the source code for our examples, you can do that from here <a href=\"https:\/\/github.com\/CodeMazeBlog\/csharp-back-to-basics\/tree\/methods\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Methods in C# Source Code.<\/a><\/div>\n<p>For the complete navigation of this series check out: <a href=\"https:\/\/code-maze.com\/csharp-back-to-basics\/\" target=\"_blank\" rel=\"noopener noreferrer\">C# Back to Basics.<\/a><\/p>\n<p>In this article, we are going to talk about:<\/p>\n<ul>\n<li><a href=\"#methodsignatures\">Method Signatures<\/a><\/li>\n<li><a href=\"#parametersandarguments\">Parameters and Arguments<\/a><\/li>\n<li><a href=\"#optionalparameters\">Optional Parameters<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<p>In <a href=\"https:\/\/code-maze.com\/csharp-access-modifiers\/\" target=\"_blank\" rel=\"noopener noreferrer\">our previous article<\/a>, we have talked about access modifiers (which are an important part of every method), so we strongly suggest reading it if you haven&#8217;t already.<\/p>\n<p>A method is a code block we can use to extract part of our code to reuse it, thus making our classes more readable and easier to maintain. We can execute all the code inside a method once we call that method by using its name and specifying the required arguments.<\/p>\n<h2 id=\"methodsignatures\">Method Signatures<\/h2>\n<p>We can declare our methods by specifying the method signature that consists of the <strong>access modifier<\/strong> (public, private&#8230;), the\u00a0<strong>name of a method<\/strong>, and <strong>method parameters<\/strong>. If we want our method to have an implementation, it needs to have two curly braces to specify the body of the method. We place our code between those curly brackets. Additionally, we have to include a <strong>return value<\/strong> (void, int, double&#8230;) for our method to be valid. The return type doesn&#8217;t apply as a part of the method signature, but we can&#8217;t create a method without it. Thus it injects itself into a signature (or specification).<\/p>\n<p>A method that returns a value needs to satisfy two conditions. First, it needs to specify a <code>return type<\/code> before the method name. The second, it needs to have a <code>return<\/code> statement within its body (inside curly braces). On the other hand, if the method doesn\u2019t return anything, the <code>void<\/code>\u00a0keyword is used instead of the return keyword. If that&#8217;s the case, a method doesn\u2019t need to have a return statement inside its body:<\/p>\n<p><a href=\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/07\/29-Method_signitures.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4311\" src=\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/07\/29-Method_signitures.png\" alt=\"Method signatures - Methods in C#\" width=\"379\" height=\"337\" srcset=\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/07\/29-Method_signitures.png 379w, https:\/\/code-maze.com\/wp-content\/uploads\/2018\/07\/29-Method_signitures-300x267.png 300w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><\/a><\/p>\n<p>In our project, we <strong>can <\/strong>have two different methods with the same name, but we <strong>can\u2019t <\/strong>have two different methods with the same method signature. At least one part of the method signature needs to be different. When we have two or more methods with the same name but different signatures, that\u2019s called <strong>Method Overloading.<\/strong><\/p>\n<h2 id=\"parametersandarguments\">Parameters and Arguments<\/h2>\n<p>In the previous example, we have seen that our methods accept only one parameter. But, we can create a method that accepts as many parameters as we need:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">public void WriteAllNumbers(int a, int b, int c)\r\n{\r\n     Console.WriteLine($\"{a} {b} {c}\");\r\n}\r\n<\/pre>\n<p>It is important that every parameter has its own type, name and that they are comma-separated.<\/p>\n<p>When we create a method in the signature, we create parameters (imagine them as the placeholders for the value of the same type). But, when we call that method we are passing real values (arguments) for those parameters:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">WriteAllNumbers(15, 16, 67);<\/pre>\n<p><em>Example 1: Create an application that prints out the sum, subtraction, and multiplication of two inputs:<\/em><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">class Program\r\n{\r\n    public static void Sum(int first, int second) \/\/method needs to be static because we are calling it in a static Main method.\r\n    {\r\n        int result = first + second;\r\n        Console.WriteLine($\"Sum result: {result}\");\r\n    }\r\n\r\n    public static void Subtract(int first, int second)\r\n    {\r\n        int result = first - second;\r\n        Console.WriteLine($\"Substraction result: {result}\");\r\n    }\r\n\r\n    public static void Multiplication(int first, int second)\r\n    {\r\n        int result = first * second;\r\n        Console.WriteLine($\"Multiplication result: {result}\");\r\n    }\r\n\r\n    static void Main(string[] args)\r\n    {\r\n        Console.WriteLine(\"Enter the first number: \");\r\n        int firstArgument = Convert.ToInt32(Console.ReadLine());\r\n\r\n        Console.WriteLine(\"Enter the second number: \");\r\n        int secondArgument = Convert.ToInt32(Console.ReadLine());\r\n\r\n        Sum(firstArgument, secondArgument);\r\n        Subtract(firstArgument, secondArgument);\r\n        Multiplication(firstArgument, secondArgument);\r\n\r\n        Console.ReadKey();\r\n    }\r\n}\r\n<\/pre>\n<p>Once we run our app, we are going to see the result:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\">Enter the first number:\r\n12\r\nEnter\u00a0the\u00a0second\u00a0number:\r\n10\r\nSum result: 22\r\nSubstraction result: 2\r\nMultiplication result: 120<\/pre>\n<h2 id=\"optionalparameters\">Optional Parameters<\/h2>\n<p>An optional parameter has a default value. The method that has optional parameters could be called without those arguments. But we can provide them as well. If we provide the values as arguments for optional parameters then the default values will be overridden:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">public static void MethodWithOptParams(int first, int second = 10)\r\n{\r\n    Console.WriteLine(first + second);\r\n}\r\n\r\nMethodWithOptParams(20); \/\/result is 30\r\nMethodWithOptParams(20, 35); \/\/result is 55\r\n<\/pre>\n<p>It is very important to know, as we can see in this example, that <strong>we must define all the optional parameters at the end of the parameter list, after the required parameters<\/strong>.\u00a0<\/p>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Using methods is very useful, not only in C# but in programming overall. So having this knowledge is quite an advantage. Don&#8217;t be afraid to use them while coding, they will make your code cleaner, maintainable, readable, and above all reusable.<\/p>\n<p>In our next post, you will learn more about <a href=\"https:\/\/code-maze.com\/cshrap-basics-ref-out-keywords\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ref and Out keywords in C#<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we are going to learn more about methods. We are going to learn how to use methods in C#, what is the method signature, and how to use parameters and arguments. For the complete navigation of this series check out: C# Back to Basics. In this article, we are going to talk [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":54466,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[505,12],"tags":[291,288,292,290,282,289],"class_list":["post-4313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-basic","category-csharp","tag-arguments","tag-methods","tag-optional-arguments","tag-parameters","tag-private","tag-return","et-has-post-format-content","et_post_format-et-post-format-standard"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Methods in C#, Signatures, Params, Arguments, Optional Params<\/title>\n<meta name=\"description\" content=\"Let&#039;s learn about Methods in C#, how to create a valid method signature, how to work with parameters and arguments and optional params.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/code-maze.com\/csharp-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Methods in C#, Signatures, Params, Arguments, Optional Params\" \/>\n<meta property=\"og:description\" content=\"Let&#039;s learn about Methods in C#, how to create a valid method signature, how to work with parameters and arguments and optional params.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/code-maze.com\/csharp-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Code Maze\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-29T07:00:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-18T08:21:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"620\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Marinko Spasojevi\u0107\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/CodeMazeBlog\" \/>\n<meta name=\"twitter:site\" content=\"@CodeMazeBlog\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marinko Spasojevi\u0107\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/\"},\"author\":{\"name\":\"Marinko Spasojevi\u0107\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/person\/d6fa06e66820968d19b39fb63cff2533\"},\"headline\":\"C# Methods\",\"datePublished\":\"2018-08-29T07:00:05+00:00\",\"dateModified\":\"2023-01-18T08:21:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/\"},\"wordCount\":657,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/code-maze.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png\",\"keywords\":[\"Arguments\",\"Methods\",\"Optional Arguments\",\"Parameters\",\"private\",\"return\"],\"articleSection\":[\"Basic\",\"C#\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/code-maze.com\/csharp-methods\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/\",\"url\":\"https:\/\/code-maze.com\/csharp-methods\/\",\"name\":\"Methods in C#, Signatures, Params, Arguments, Optional Params\",\"isPartOf\":{\"@id\":\"https:\/\/code-maze.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png\",\"datePublished\":\"2018-08-29T07:00:05+00:00\",\"dateModified\":\"2023-01-18T08:21:26+00:00\",\"description\":\"Let's learn about Methods in C#, how to create a valid method signature, how to work with parameters and arguments and optional params.\",\"breadcrumb\":{\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/code-maze.com\/csharp-methods\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#primaryimage\",\"url\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png\",\"contentUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png\",\"width\":1100,\"height\":620,\"caption\":\"12 Methods\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/code-maze.com\/csharp-methods\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/code-maze.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C# Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/code-maze.com\/#website\",\"url\":\"https:\/\/code-maze.com\/\",\"name\":\"Code Maze\",\"description\":\"Learn. Code. Succeed.\",\"publisher\":{\"@id\":\"https:\/\/code-maze.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/code-maze.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/code-maze.com\/#organization\",\"name\":\"Code Maze\",\"url\":\"https:\/\/code-maze.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png\",\"contentUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png\",\"width\":3511,\"height\":3510,\"caption\":\"Code Maze\"},\"image\":{\"@id\":\"https:\/\/code-maze.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/CodeMazeBlog\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/person\/d6fa06e66820968d19b39fb63cff2533\",\"name\":\"Marinko Spasojevi\u0107\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/marinko-1x1-3-150x150.jpg\",\"contentUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/marinko-1x1-3-150x150.jpg\",\"caption\":\"Marinko Spasojevi\u0107\"},\"description\":\"Hi, my name is Marinko Spasojevic. Currently, I work as a full-time .NET developer and my passion is web application development. Just getting something to work is not enough for me. To make it just how I like it, it must be readable, reusable, and easy to maintain. Prior to being an author on the CodeMaze blog, I had been working as a professor of Computer Science for several years. So, sharing knowledge while working as a full-time developer comes naturally to me.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/marinko-spasojevic\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/CodeMazeBlog\"],\"url\":\"https:\/\/code-maze.com\/author\/marinko\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Methods in C#, Signatures, Params, Arguments, Optional Params","description":"Let's learn about Methods in C#, how to create a valid method signature, how to work with parameters and arguments and optional params.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/code-maze.com\/csharp-methods\/","og_locale":"en_US","og_type":"article","og_title":"Methods in C#, Signatures, Params, Arguments, Optional Params","og_description":"Let's learn about Methods in C#, how to create a valid method signature, how to work with parameters and arguments and optional params.","og_url":"https:\/\/code-maze.com\/csharp-methods\/","og_site_name":"Code Maze","article_published_time":"2018-08-29T07:00:05+00:00","article_modified_time":"2023-01-18T08:21:26+00:00","og_image":[{"width":1100,"height":620,"url":"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png","type":"image\/png"}],"author":"Marinko Spasojevi\u0107","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/CodeMazeBlog","twitter_site":"@CodeMazeBlog","twitter_misc":{"Written by":"Marinko Spasojevi\u0107","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/code-maze.com\/csharp-methods\/#article","isPartOf":{"@id":"https:\/\/code-maze.com\/csharp-methods\/"},"author":{"name":"Marinko Spasojevi\u0107","@id":"https:\/\/code-maze.com\/#\/schema\/person\/d6fa06e66820968d19b39fb63cff2533"},"headline":"C# Methods","datePublished":"2018-08-29T07:00:05+00:00","dateModified":"2023-01-18T08:21:26+00:00","mainEntityOfPage":{"@id":"https:\/\/code-maze.com\/csharp-methods\/"},"wordCount":657,"commentCount":4,"publisher":{"@id":"https:\/\/code-maze.com\/#organization"},"image":{"@id":"https:\/\/code-maze.com\/csharp-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png","keywords":["Arguments","Methods","Optional Arguments","Parameters","private","return"],"articleSection":["Basic","C#"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/code-maze.com\/csharp-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/code-maze.com\/csharp-methods\/","url":"https:\/\/code-maze.com\/csharp-methods\/","name":"Methods in C#, Signatures, Params, Arguments, Optional Params","isPartOf":{"@id":"https:\/\/code-maze.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/code-maze.com\/csharp-methods\/#primaryimage"},"image":{"@id":"https:\/\/code-maze.com\/csharp-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png","datePublished":"2018-08-29T07:00:05+00:00","dateModified":"2023-01-18T08:21:26+00:00","description":"Let's learn about Methods in C#, how to create a valid method signature, how to work with parameters and arguments and optional params.","breadcrumb":{"@id":"https:\/\/code-maze.com\/csharp-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/code-maze.com\/csharp-methods\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/code-maze.com\/csharp-methods\/#primaryimage","url":"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png","contentUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2018\/08\/12-Methods.png","width":1100,"height":620,"caption":"12 Methods"},{"@type":"BreadcrumbList","@id":"https:\/\/code-maze.com\/csharp-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/code-maze.com\/"},{"@type":"ListItem","position":2,"name":"C# Methods"}]},{"@type":"WebSite","@id":"https:\/\/code-maze.com\/#website","url":"https:\/\/code-maze.com\/","name":"Code Maze","description":"Learn. Code. Succeed.","publisher":{"@id":"https:\/\/code-maze.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/code-maze.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/code-maze.com\/#organization","name":"Code Maze","url":"https:\/\/code-maze.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/code-maze.com\/#\/schema\/logo\/image\/","url":"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png","contentUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png","width":3511,"height":3510,"caption":"Code Maze"},"image":{"@id":"https:\/\/code-maze.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/CodeMazeBlog"]},{"@type":"Person","@id":"https:\/\/code-maze.com\/#\/schema\/person\/d6fa06e66820968d19b39fb63cff2533","name":"Marinko Spasojevi\u0107","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/code-maze.com\/#\/schema\/person\/image\/","url":"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/marinko-1x1-3-150x150.jpg","contentUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/marinko-1x1-3-150x150.jpg","caption":"Marinko Spasojevi\u0107"},"description":"Hi, my name is Marinko Spasojevic. Currently, I work as a full-time .NET developer and my passion is web application development. Just getting something to work is not enough for me. To make it just how I like it, it must be readable, reusable, and easy to maintain. Prior to being an author on the CodeMaze blog, I had been working as a professor of Computer Science for several years. So, sharing knowledge while working as a full-time developer comes naturally to me.","sameAs":["https:\/\/www.linkedin.com\/in\/marinko-spasojevic\/","https:\/\/x.com\/https:\/\/twitter.com\/CodeMazeBlog"],"url":"https:\/\/code-maze.com\/author\/marinko\/"}]}},"_links":{"self":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts\/4313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/comments?post=4313"}],"version-history":[{"count":3,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts\/4313\/revisions"}],"predecessor-version":[{"id":80687,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts\/4313\/revisions\/80687"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/media\/54466"}],"wp:attachment":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/media?parent=4313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/categories?post=4313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/tags?post=4313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}