﻿
{"id":4523,"date":"2016-06-24T22:02:15","date_gmt":"2016-06-24T22:02:15","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=4523"},"modified":"2016-06-24T22:02:15","modified_gmt":"2016-06-24T22:02:15","slug":"cta-struct-yapilari-ve-kullanim-durumlari","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/cta-struct-yapilari-ve-kullanim-durumlari\/","title":{"rendered":"C#&#8217;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Merhaba,<\/p>\n<p>Programlama dillerinde en m\u00fchim OOP(Object Oriented Programing) yap\u0131lar\u0131ndan olan class yap\u0131s\u0131na g\u00f6re daha basit d\u00fczeyde i\u015flemler ger\u00e7ekle\u015ftirmemizi sa\u011flayan ve belirli bir tak\u0131m k\u0131s\u0131tlamalar\u0131 yan\u0131nda bar\u0131nd\u0131ran struct yap\u0131s\u0131n\u0131 C# diline \u00f6zel ele alaca\u011f\u0131z.<\/p>\n<p>\u015eimdi d\u00fc\u015f\u00fcn\u00fcn ki, bir yap\u0131 olu\u015fturacaks\u0131n\u0131z ve bu yap\u0131 birbirleriyle ili\u015fkili verileri bar\u0131nd\u0131racakt\u0131r. Haliyle bunu bir class olarak belirleyebilir ve o classtan \u00fcretilen nesne \u00fczerinde i\u015flemlerimizi icra edebiliriz. Amma velakin bu yap\u0131m\u0131z class kadar kompleks i\u015flemler i\u00e7in tasarlanm\u0131\u015f bir yap\u0131 gerektirmiyorsa ve tutulacak verileri enkaps\u00fcle etmek yetiyorsa i\u015fte bu tarz durumlarda struct yap\u0131s\u0131n\u0131 tercih edebiliriz.<\/p>\n<blockquote><p>Unutmay\u0131n\u0131z ki, classlar bir Referans Tipli(Reference Types) \u00f6zellik g\u00f6sterirken struct yap\u0131lar\u0131 bir De\u011fer Tipli(Value Types) de\u011fi\u015fken \u00f6zelli\u011fi g\u00f6stermektedir.<\/p><\/blockquote>\n<p>Yani anlayaca\u011f\u0131n\u0131z &#8220;int&#8221; gibi, &#8220;bool&#8221; gibi de\u011fer tipli bir de\u011fi\u015fken olu\u015fturmak istiyorsan\u0131z struct yap\u0131s\u0131n\u0131 tercih edebilirsiniz.<\/p>\n<p>Bu demek oluyor ki, ger\u00e7ekle\u015ftirece\u011fimiz i\u015flevselli\u011fin yap\u0131sal olarak bir nesne yahut de\u011fer tipli bir de\u011fi\u015fken yap\u0131s\u0131nda ger\u00e7ekle\u015ftirilmesini tercih edebilir ve birazdan bahsedece\u011fim olumlu olumsuz yanlar\u0131da hesaba katarak projenizde performans\u0131 daha maliyetli bir hale getirebilirsiniz.<\/p>\n<p>\u015eimdi struct yap\u0131s\u0131n\u0131 C# perspektifinden ad\u0131m ad\u0131m de\u011ferlendirelim;<\/p>\n<ul>\n<li>Yaz\u0131m\u0131z\u0131n yukar\u0131daki sat\u0131rlar\u0131nda da bahsetti\u011fimiz gibi struct C#&#8217;ta value type yaratabilece\u011fimiz yap\u0131d\u0131r.<\/li>\n<li>struct yap\u0131lar\u0131, herhangi bir struct yahut class&#8217;tan kal\u0131t\u0131m alamazlar.<br \/>\n<table>\n<tbody>\n<tr>\n<td><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4526\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131.jpg\" alt=\"C#'ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"216\" height=\"200\" \/><\/a><\/td>\n<td><\/td>\n<td><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4528\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-1.jpg\" alt=\"C#'ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"196\" height=\"194\" \/><\/a><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Benzer \u015fekilde bir class yap\u0131s\u0131da struct yap\u0131s\u0131ndan miras alamamaktad\u0131r.<\/li>\n<li>struct yap\u0131lar\u0131, interface yap\u0131lar\u0131n\u0131 uygulayabilmektedirler.\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    struct MyStruct1 : IInterface\r\n    {\r\n        int x;\r\n        bool y;\r\n        public void A()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n        public void B(bool c)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n\r\n    interface IInterface\r\n    {\r\n        void A();\r\n        void B(bool c);\r\n    }\r\n<\/pre>\n<\/li>\n<li>struct yap\u0131lar new keyword\u00fcyle \u00f6rneklendirilebilmektedir. Burada iki durum s\u00f6z konusudur.\n<ol>\n<li><strong><em>E\u011fer <span style=\"color: #ff0000;\">new<\/span> operat\u00f6r\u00fcyle \u00f6rneklendirirsek ne olur?<\/em><\/strong><br \/>\nBildi\u011finiz gibi new operat\u00f6r\u00fc classlarda kullan\u0131ld\u0131\u011f\u0131 zaman ilgili classtan bir nesne talep edilmekte ve \u00fcretilen nesne belle\u011fin Heap k\u0131sm\u0131nda muhafaza edilmektedir. Ee s\u00f6z gelimi struct yap\u0131s\u0131nda da new operat\u00f6r\u00fcn\u00fc kullan\u0131rsak e\u011fer evet ilgili yap\u0131dan bir nesne \u00fcretilecektir ama struct bir de\u011fer tipli de\u011fi\u015fken yap\u0131s\u0131nda oldu\u011fundan dolay\u0131 o nesne belle\u011fin Stack k\u0131sm\u0131nda muhafaza edilecektir.<\/p>\n<p>Bu yap\u0131ya kadar olu\u015fturdu\u011fumuz t\u00fcm nesnelerin Heap k\u0131sm\u0131nda oldu\u011funu s\u00f6ylemi\u015ftik. Halbuki Stack k\u0131sm\u0131nda struct yap\u0131s\u0131nda nesneleri tutabilmekteyiz.<\/p>\n<p>Ayriyetten struct i\u00e7erisindeki fieldlara default de\u011ferleri atanm\u0131\u015f olacakt\u0131r.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public partial class Form1 : Form\r\n    {\r\n        public Form1()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void Form1_Load(object sender, EventArgs e)\r\n        {\r\n            MyStruct ms = new MyStruct();\r\n            MessageBox.Show(ms.x + &quot; &quot; + ms.y + &quot; &quot; + ms.z);\r\n        }\r\n    }\r\n\r\n    struct MyStruct\r\n    {\r\n        public int x;\r\n        public bool y;\r\n        public string z;\r\n    }\r\n<\/pre>\n<p>Ekran \u00e7\u0131kt\u0131s\u0131 a\u015fa\u011f\u0131dad\u0131r.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-2.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"140\" height=\"131\" class=\"aligncenter size-full wp-image-4533\" \/><\/a>\n<\/li>\n<li><strong><em>E\u011fer <span style=\"color: #ff0000;\">new<\/span> operat\u00f6r\u00fc kullanmazsak ne olur?<\/em><\/strong><br \/>\nHaliyle classlardaki gibi nesne mecburiyeti yoktur. Yani new operat\u00f6r\u00fc ile struct yap\u0131dan bir nesne \u00fcretmeden de o struct&#8217;\u0131 kullanabilmekteyiz.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-3-300x254.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"300\" height=\"254\" class=\"aligncenter size-medium wp-image-4535\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-3-300x254.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-3.jpg 514w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nYukar\u0131da da g\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi nesnesiz structlar\u0131 kullanabilmekteyiz kullanmas\u0131na ama i\u00e7erisindeki verilerin ilk de\u011ferleri atanmayaca\u011f\u0131ndan dolay\u0131 hata al\u0131nacakt\u0131r.<\/p>\n<p>\u0130\u015fte b\u00f6yle bir durumda ilk de\u011ferleri atayarak kullanmak gerekecektir.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n            MyStruct ms;\r\n            ms.x = 3;\r\n            ms.y = true;\r\n            ms.z = &quot;abc&quot;;\r\n            MessageBox.Show(ms.x + &quot; &quot; + ms.y + &quot; &quot; + ms.z);\r\n<\/pre>\n<p>Anlayaca\u011f\u0131n\u0131z class yap\u0131lar\u0131 new keyword\u00fc ile belle\u011fe fiziksel olarak \u00e7\u0131kabilmekte ve kullan\u0131labilmektedir. Aksi taktirde belle\u011fe \u00e7\u0131kamamaktad\u0131rlar. Struct&#8217;larda ise new ile belle\u011fe \u00e7\u0131kma zorunlulu\u011fu yoktur lakin i\u00e7erisindeki elemanlar\u0131n ilk de\u011ferleri mecburi verilmek zorundad\u0131r.\n<\/li>\n<\/ol>\n<\/li>\n<li>struct yap\u0131lar i\u00e7erilerinde metod, property veya field bar\u0131ndabilirler.\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    struct MyStruct\r\n    {\r\n        public int x;\r\n        public bool y;\r\n        public string z { get; set; }\r\n\r\n        public double Islem()\r\n        {\r\n            if (y)\r\n            {\r\n                return x * int.Parse(z);\r\n            }\r\n\r\n            return -1;\r\n        }\r\n    }\r\n<\/pre>\n<p>Haliyle bu elemanlardan metodlar\u0131 kullanabilmek i\u00e7in struct de\u011fi\u015fkenine new operat\u00f6r\u00fcyle bir nesne ba\u011flama zorunlulu\u011fumuz yoktur. Ama property yap\u0131lar\u0131n\u0131 kullanabilmek i\u00e7in struct&#8217;tan bir nesneye ihtiyac\u0131m\u0131z vard\u0131r.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n        private void Form1_Load(object sender, EventArgs e)\r\n        {\r\n            MyStruct ms = new MyStruct();\r\n            ms.x = 3;\r\n            ms.y = true;\r\n            ms.z = &quot;3&quot;;\r\n            MessageBox.Show(ms.x + &quot; &quot; + ms.y + &quot; &quot; + ms.z + &quot; &quot; + ms.Islem());\r\n        }\r\n<\/pre>\n<\/li>\n<li>struct yap\u0131lar i\u00e7lerinde static alanlar bar\u0131nd\u0131rabilirler.\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    struct MyStruct\r\n    {\r\n        public int x;\r\n\r\n        static public double Islem()\r\n        {\r\n            return -1;\r\n        }\r\n    }\r\n<\/pre>\n<p>ve bu static yap\u0131lara normal bildi\u011finiz yap\u0131 ismi \u00fczerinden .(nokta) diyerek ula\u015fabilmekteyiz.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n            MyStruct.Islem().ToString();\r\n<\/pre>\n<\/li>\n<li>Ve son olarak struct yap\u0131lar i\u00e7erisinde class, class i\u00e7erisinde de struct yap\u0131lar tan\u0131mlanabilir.<br \/>\n<table>\n<tr>\n<td><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-4-300x213.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"300\" height=\"213\" class=\"aligncenter size-medium wp-image-4539\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-4-300x213.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-4.jpg 407w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-5-300x266.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"300\" height=\"266\" class=\"aligncenter size-medium wp-image-4540\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-5-300x266.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-5.jpg 410w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<\/tr>\n<\/table>\n<\/li>\n<\/ul>\n<p>Evet, g\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi struct dedi\u011fimiz aslen yap\u0131sal ve i\u00e7erik(implicit) olarak bir <a href=\"http:\/\/www.gencayyildiz.com\/blog\/cta-sealed-keywordu\/\" target=\"_blank\">sealed class<\/a>&#8216;t\u0131r diyebiliriz. Bunun yan\u0131nda daha hafif(lightweight) bir class yap\u0131s\u0131 oldu\u011fu s\u00f6ylenebilir. \u0130\u00e7eri\u011fimizden de anla\u015f\u0131laca\u011f\u0131na g\u00f6re Tip Tan\u0131mlama(Type Definition) yaparken kullanabiliriz. <\/p>\n<p>\u0130\u00e7erikte bahsedildi\u011fi gibi referans de\u011fil, de\u011fer tipli bir yap\u0131 g\u00f6stermesinin sebebini a\u015fa\u011f\u0131daki \u00f6rnekten de anlayabiliriz.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-6.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-6-300x186.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"300\" height=\"186\" class=\"aligncenter size-medium wp-image-4542\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-6-300x186.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-6.jpg 543w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nBurada dikkat ederseniz e\u011fer ms.x ve ms.y de\u011fi\u015fmeyece\u011finden dolay\u0131 bir <a href=\"http:\/\/www.gencayyildiz.com\/blog\/tag\/deep-copy\/\" target=\"_blank\">Deep Copy<\/a> s\u00f6z konusudur. E\u011fer referans tipli yap\u0131lar olsalard\u0131 a\u015fa\u011f\u0131daki gibi bir sonu\u00e7 elde edilecekti ve <a href=\"http:\/\/www.gencayyildiz.com\/blog\/tag\/shallow-copy\/\" target=\"_blank\">Shallow Copy<\/a> s\u00f6z konusu olacakt\u0131.<\/p>\n<p><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-7.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-7-300x206.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"300\" height=\"206\" class=\"aligncenter size-medium wp-image-4543\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-7-300x206.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-7.jpg 523w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>G\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi iki referansta ayn\u0131 nesneyi i\u015faret etti\u011finden dolay\u0131 referanslar \u00fczerindeki field de\u011ferleri do\u011fal olarak ayn\u0131 sonucu vermekte yani mc.x ve mc.y de\u011fi\u015fkenlik g\u00f6stermektedir.<\/p>\n<p>Son olarak struct yap\u0131lar\u0131yla ilgili u\u00e7 bir noktaya daha de\u011finip i\u00e7eri\u011fimizi sonland\u0131ral\u0131m.<\/p>\n<p>struct yap\u0131lar, kendilerini this keyword\u00fcn\u00fc kullanarak de\u011fi\u015ftirebilen yap\u0131lard\u0131r.<\/p>\n<p>\u00d6rne\u011fin;<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-8.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-8-300x264.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"300\" height=\"264\" class=\"aligncenter size-medium wp-image-4545\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-8-300x264.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-8.jpg 422w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Asl\u0131nda bu tarz bir i\u015fleme class yap\u0131s\u0131 izin vermedi\u011finden dolay\u0131 ilgin\u00e7 bir \u00f6zelliktir.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-9.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/06\/Cta-Struct-Yap\u0131lar\u0131-ve-Kullan\u0131m-Durumlar\u0131-9.jpg\" alt=\"C#&#039;ta Struct Yap\u0131lar\u0131 ve Kullan\u0131m Durumlar\u0131\" width=\"263\" height=\"149\" class=\"aligncenter size-full wp-image-4547\" \/><\/a><\/p>\n<p>G\u00fczel ve e\u011flenceli bir konununda sonuna gelmi\u015f bulunmaktay\u0131z.<br \/>\nOkudu\u011funuz i\u00e7in hepinize te\u015fekk\u00fcr ederim&#8230;<br \/>\nSonraki yaz\u0131lar\u0131mda g\u00f6r\u00fc\u015fmek \u00fczere diyelim&#8230; \ud83d\ude42<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Merhaba, Programlama dillerinde en m\u00fchim OOP(Object Oriented Programing) yap\u0131lar\u0131ndan olan class yap\u0131s\u0131na g\u00f6re daha basit d\u00fczeyde i\u015flemler ger\u00e7ekle\u015ftirmemizi sa\u011flayan ve belirli bir tak\u0131m k\u0131s\u0131tlamalar\u0131 yan\u0131nda bar\u0131nd\u0131ran struct yap\u0131s\u0131n\u0131 C# diline \u00f6zel ele alaca\u011f\u0131z. \u015eimdi&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":3223,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[68,1024,1250,1256,1257,1252,357,1261,1022,1251,1255,1259,1258,1260,1254,1253],"class_list":["post-4523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-sharp-c","tag-class","tag-deep-copy","tag-heap","tag-implicit","tag-lightweight","tag-object-oriented-programing","tag-oop","tag-reference-type","tag-shallow-copy","tag-struct","tag-structure","tag-tip-tanimlama","tag-type-definition","tag-value-type","tag-yapi","tag-yapilar"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/4523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=4523"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/4523\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/3223"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=4523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=4523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=4523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}