{"id":189,"date":"2021-12-25T16:09:09","date_gmt":"2021-12-25T09:09:09","guid":{"rendered":"https:\/\/csharptutorial.net\/?page_id=189"},"modified":"2023-07-02T19:17:13","modified_gmt":"2023-07-02T12:17:13","slug":"csharp-for-loop","status":"publish","type":"page","link":"https:\/\/www.csharptutorial.net\/csharp-tutorial\/csharp-for-loop\/","title":{"rendered":"C# for loop"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to use the C# for loop statement to execute a block repeatedly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to the C# for loop statement<\/h2>\n\n\n\n<p>C# <code>for<\/code> statement executes a block while a condition is <code>true<\/code>. The following shows the syntax of the <code>for<\/code> statement:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">for<\/span>(initializer; condition; iterator)\n{\n    <span class=\"hljs-comment\">\/\/ statement<\/span>\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>for<\/code> statement has the following elements <code>initializer<\/code>, <code>condition<\/code>, <code>iterator<\/code>, and the loop body<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">initializer<\/h3>\n\n\n\n<p>The <code>for<\/code> statement executes the <code>initializer<\/code> only once before entering the loop. Typically, you declare and initialize a local loop variable in the initializer. <\/p>\n\n\n\n<p class=\"note\">Note that if you declare a variable in the initializer, you cannot access it outside the <code>for<\/code> statement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">condition<\/h3>\n\n\n\n<p>The <code>condition<\/code> is a boolean expression that determines whether the <code>for<\/code> statement should execute the next iteration. <\/p>\n\n\n\n<p>The <code>for<\/code> statement evaluates the <code>condition<\/code> before each iteration. If the <code>condition<\/code> is <code>true<\/code> (or is not present), the <code>for<\/code> statement executes the next iteration. Otherwise, it&#8217;ll exit the loop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">iterator<\/h3>\n\n\n\n<p>The <code>for<\/code> statement executes the <code>iterator<\/code> after each iteration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">loop body<\/h3>\n\n\n\n<p>The loop body is inside the curly braces (<code>{}<\/code>) that may consist of one or more statements. If the <code>condition<\/code> is <code>true<\/code> (or not present), the <code>for<\/code> statement executes the loop body in each iteration.<\/p>\n\n\n\n<p>In the <code>for<\/code> statement, the <code>initializer<\/code>, <code>condition<\/code>, and <code>iterator<\/code> are optional. Therefore, you can have an indefinite <code>for<\/code> loop like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">for<\/span>(;;) \n{\n    <span class=\"hljs-comment\">\/\/ statement<\/span>\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this case, you need to use the <code><a href=\"https:\/\/csharptutorial.net\/csharp-tutorial\/csharp-break\/\" data-type=\"page\" data-id=\"195\">break<\/a><\/code> statement to terminate the loop at some point in time to avoid an <strong>indefinite loop<\/strong>.<\/p>\n\n\n\n<p>The following flowchart illustrates how the <code>for<\/code> loop statement works.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/csharptutorial.net\/wp-content\/uploads\/2022\/01\/csharp-for-loop.svg\" alt=\"c# for loop\" class=\"wp-image-541\"\/><\/figure>\n<\/div>\n\n\n<p>In practice, you&#8217;ll use the <code>for<\/code> statement to execute a block a <strong>specified number of times<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">C# for loop examples<\/h2>\n\n\n\n<p>Let&#8217;s take some examples of using the <code>for<\/code> loop statement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) A simple C# for loop example<\/h3>\n\n\n\n<p>The following example uses the <code>for<\/code> statement to output three numbers from zero to two to the console:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">for<\/span> (<span class=\"hljs-keyword\">int<\/span> i = <span class=\"hljs-number\">0<\/span>; i &lt; <span class=\"hljs-number\">3<\/span>; i++)\n{\n    Console.WriteLine(i);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-number\">0<\/span>\n<span class=\"hljs-number\">1<\/span>\n<span class=\"hljs-number\">2<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>How it works.<\/p>\n\n\n\n<p>In the initializer, we declare and initialize the local variable <code>i<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">int<\/span> i = <span class=\"hljs-number\">0<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this condition, we check if the variable <code>i<\/code> is less than three. The condition will determine if the next iteration should run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">i &lt; <span class=\"hljs-number\">3<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Since the variable <code>i<\/code> is zero, which is less than three, the <code>for<\/code> statement executes its loop body that outputs the variable <code>i<\/code> to the console:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">Console.WriteLine(i);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>After the first iteration, the <code>for<\/code> statement runs the iterator that increases the value of the variable <code>i<\/code> by one:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">i++<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>i<\/code> variable is 1.<\/p>\n\n\n\n<p>Starting from the second iteration, the <code>for<\/code> statement doesn&#8217;t execute the initializer but only evaluates the condition to determine whether it should continue to the next iteration.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">i &lt; <span class=\"hljs-number\">3<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Because the variable <code>i<\/code> is one, the condition is <code>true<\/code>. Therefore, the <code>for<\/code> statement executes its loop body the second time that outputs the variable i to the console, and executes the iterator that increases the variable i by one:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">i++<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>After this, the variable <code>i<\/code> is two. The <code>for<\/code> statement continues checking the condition to determine if it should continue to the next iteration:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">i &lt; <span class=\"hljs-number\">3<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Because variable <code>i<\/code> is two, the condition is <code>true<\/code>. Therefore, the <code>for<\/code> statement runs the third iteration that outputs the variable <code>i<\/code> to the output and increases the variable <code>i<\/code> by one.<\/p>\n\n\n\n<p>This time the <code>i<\/code> variable is three that made the condition <code>false<\/code>. Hence, the loop exits.<\/p>\n\n\n\n<p>In summary, the <code>for<\/code> statement runs its body three times that output three numbers zero, one, and two to the console.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2) Using the C# for loop to calculate the total of integers from 1 to 10<\/h3>\n\n\n\n<p>The following example uses the C# <code>for<\/code> statement to calculate the total of integers from 1 to 10:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">int<\/span> total = <span class=\"hljs-number\">0<\/span>;\n<span class=\"hljs-keyword\">for<\/span> (<span class=\"hljs-keyword\">int<\/span> i = <span class=\"hljs-number\">1<\/span>; i &lt;= <span class=\"hljs-number\">10<\/span>; i++)\n{\n    total += i;\n\n}\nConsole.WriteLine(<span class=\"hljs-string\">$\"Total:<span class=\"hljs-subst\">{total}<\/span>\"<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">Total:<span class=\"hljs-number\">55<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, the <code>for<\/code> statement adds the variable <code>i<\/code> to the <code>total<\/code> in each iteration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3) Using the C# for loop to display even numbers in the range<\/h3>\n\n\n\n<p>The following example uses the <code>for<\/code> loop statement to display even numbers between <code>0<\/code> and <code>10<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">for<\/span> (<span class=\"hljs-keyword\">int<\/span> i = <span class=\"hljs-number\">0<\/span>; i &lt; <span class=\"hljs-number\">10<\/span>; i++)\n{\n    <span class=\"hljs-keyword\">if<\/span> (i % <span class=\"hljs-number\">2<\/span> == <span class=\"hljs-number\">0<\/span>)\n    {\n        Console.Write(<span class=\"hljs-string\">$\"<span class=\"hljs-subst\">{i}<\/span> \"<\/span>);\n    }\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-number\">0<\/span> <span class=\"hljs-number\">2<\/span> <span class=\"hljs-number\">4<\/span> <span class=\"hljs-number\">6<\/span> <span class=\"hljs-number\">8<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, the loop body only displays the variable <code>i<\/code> if it is an even number determined by the condition <code>i%2 == 0<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4) Using the C# for loop to display every character of a string<\/h3>\n\n\n\n<p>The following example uses the <code>for<\/code> statement to display every character of a string:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\"><span class=\"hljs-keyword\">string<\/span> message = <span class=\"hljs-string\">\"Hello\"<\/span>;\n\n<span class=\"hljs-keyword\">for<\/span> (<span class=\"hljs-keyword\">int<\/span> i = <span class=\"hljs-number\">0<\/span>; i &lt; message.Length; i++)\n{\n    Console.WriteLine(message&#91;i]);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-17\" data-shcb-language-name=\"C#\" data-shcb-language-slug=\"cs\"><span><code class=\"hljs language-cs\">H\ne\nl\nl\no<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-17\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C#<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cs<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, the string <code>message<\/code> has an index starting from <code>0<\/code> to <code>message.Length - 1<\/code>.  Therefore, we use the <code>for<\/code> statement to access individual characters of the string by an index in that range.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the <code>for<\/code> loop to execute a block repeatedly for a specified number of times.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"189\"\n\t\t\t\tdata-post-url=\"https:\/\/www.csharptutorial.net\/csharp-tutorial\/csharp-for-loop\/\"\n\t\t\t\tdata-post-title=\"C# for loop\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"189\"\n\t\t\t\tdata-post-url=\"https:\/\/www.csharptutorial.net\/csharp-tutorial\/csharp-for-loop\/\"\n\t\t\t\tdata-post-title=\"C# for loop\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: in this tutorial, you&#8217;ll learn how to use the C# for loop statement to execute a block repeatedly. Introduction to the C# for loop statement C# for statement executes a block while a condition is true. The following shows the syntax of the for statement: The for statement has the following elements initializer, condition, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7,"menu_order":18,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-189","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/pages\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":4,"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/pages\/189\/revisions"}],"predecessor-version":[{"id":2528,"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/pages\/189\/revisions\/2528"}],"up":[{"embeddable":true,"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/pages\/7"}],"wp:attachment":[{"href":"https:\/\/www.csharptutorial.net\/wp-json\/wp\/v2\/media?parent=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}