<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[האם אפשר לקבל אפקט של מצביע בדוטנט ?]]></title><description><![CDATA[<p dir="auto">יש לי למשל מערך כזה:</p>
<pre><code>Structure myStrc
        Dim A As Integer
        Dim B As Integer()
    End Structure

    Private mainArr(10)() As myStrc
</code></pre>
<p dir="auto">בשלב ראשון אני עובר על עשרת האיברים של mainArr ובכל איבר אני שם מערך של myStrc שבכל myStrc יש ערך ל A אבל ה B בנתיים נשאר ריק<br />
בשלב שני אני עובר שוב על כל mainArr ומכניס לליסט מסוג IList(Of T) כמה myStrc נבחרים על פי איזה התאמה.</p>
<p dir="auto">בשלב שלישי אני עובר שוב על mainArr ומגדיר את משתנה B שבכל myStrc</p>
<p dir="auto">ומה שקורה זה ש myStrc  שבתוך הליסט לא מתעדכן ומשתנה B נשאר ריק, אם הייתי עושה את זה ב C++ הוא היה מתעדכן כי הליסט היה מצביע myStrc שבתוך mainArr  ולא מחזיק עותק של myStrc.</p>
<p dir="auto">זה המקרה הדי מסובך שלי, אבל השאלה בקיצור איך אפשר במקרה כזה שהליסט יחזיק מצביע וברגע שאחד מאיברי ה mainArr  ישתנה גם בליסט יראו את זה.<br />
תודה לכולם.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 09:14 (+03:00)</em></p>
]]></description><link>https://tchumim.com/topic/421/האם-אפשר-לקבל-אפקט-של-מצביע-בדוטנט</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 22:04:15 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/421.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jan 2018 10:45:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to האם אפשר לקבל אפקט של מצביע בדוטנט ? on Mon, 29 Jan 2018 10:45:16 GMT]]></title><description><![CDATA[<p dir="auto">טוב, בדקתי כרגע ובאמת אכן הפתרון שלך מצויין השתמשתי במחלקה במקום בסטרוקטורה וההבדל במהירות הוא ממש מזערי כמה עשרות אלפיות השניה בלבד, לא יודע מה בדיוק השתנה מהבדיקה הקודמת אבל כרגע זה מצויין.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 14:19 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/2807</link><guid isPermaLink="true">https://tchumim.com/post/2807</guid><dc:creator><![CDATA[רחמים]]></dc:creator><pubDate>Mon, 29 Jan 2018 10:45:16 GMT</pubDate></item><item><title><![CDATA[Reply to האם אפשר לקבל אפקט של מצביע בדוטנט ? on Mon, 29 Jan 2018 10:45:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A8%D7%97%D7%9E%D7%99%D7%9D">@<bdi>רחמים</bdi></a></p>
<blockquote>
<p dir="auto">את התכנון אני משפר בכל עת בלא קשר לנושא הנידון</p>
</blockquote>
<p dir="auto">זהו, שיש תכנון מצד העניין, ויש תכנון בגלל אילוצי השפה - "עם קשר" במקרה זה. ייתכן שהתכנון שלך טוב, ובכל אופן עליך "לשבש" אותו בשביל להפיק את המירב מדוט נט.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 14:15 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/2806</link><guid isPermaLink="true">https://tchumim.com/post/2806</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 29 Jan 2018 10:45:15 GMT</pubDate></item><item><title><![CDATA[Reply to האם אפשר לקבל אפקט של מצביע בדוטנט ? on Mon, 29 Jan 2018 10:45:15 GMT]]></title><description><![CDATA[<p dir="auto">את התכנון אני משפר בכל עת בלא קשר לנושא הנידון, אבל מה שהיה פלא בעיני שכאשר משנים מסטרוקטורה למחלקה זה מכפיל את זמן הפעולה.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 13:43 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/2805</link><guid isPermaLink="true">https://tchumim.com/post/2805</guid><dc:creator><![CDATA[רחמים]]></dc:creator><pubDate>Mon, 29 Jan 2018 10:45:15 GMT</pubDate></item><item><title><![CDATA[Reply to האם אפשר לקבל אפקט של מצביע בדוטנט ? on Mon, 29 Jan 2018 10:45:15 GMT]]></title><description><![CDATA[<p dir="auto">מחלקה היא מצביע לכל דבר.</p>
<p dir="auto">ובקשר לביצועים, נסה לשנות את התכנון שלך. או שלא תשנה כלל, או שתשנה ידנית בכל מקום, או וכו'</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 13:41 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/2804</link><guid isPermaLink="true">https://tchumim.com/post/2804</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 29 Jan 2018 10:45:15 GMT</pubDate></item><item><title><![CDATA[Reply to האם אפשר לקבל אפקט של מצביע בדוטנט ? on Mon, 29 Jan 2018 10:45:15 GMT]]></title><description><![CDATA[<p dir="auto">בהתחלה עשיתי מחלקה אבל שמתי לב להאטה, עם מחלקה הפעולה מסתיימת בכפול זמן מאשר עם סטרוקטורה! כך זה בכל מקרה בקוד שלי כאשר השינוי היחיד הוא שבמקום Structure myStrc אני כותב Class myStrc</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%93%D7%95%D7%93">@<bdi>דוד</bdi></a> ל.ט.</p>
<blockquote>
<p dir="auto">ייתכן שיש דרך ע"י מצביעים, אני לא בטוח</p>
</blockquote>
<p dir="auto">ב C++ ברור שאפשר לעשות מצביע לכל מקום ולכל דבר, כי כל דבר שקיים בזיכרון יש לו כתובת ואת הכתובת הזו מחזיק המצביע.</p>
<p dir="auto">טוב, אז אני אשנה את זה למחלקה כן יהיה אפשר להגיע לאפקט של מצביע בדוטנט?</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 13:37 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/2803</link><guid isPermaLink="true">https://tchumim.com/post/2803</guid><dc:creator><![CDATA[רחמים]]></dc:creator><pubDate>Mon, 29 Jan 2018 10:45:15 GMT</pubDate></item><item><title><![CDATA[Reply to האם אפשר לקבל אפקט של מצביע בדוטנט ? on Mon, 29 Jan 2018 10:45:15 GMT]]></title><description><![CDATA[<p dir="auto">Structure עשוי להיות הפניה לפי ערך. השמה שלו היא למעשה העתקה, וממילא אין דרך להחזיק התייחסות אליו.<br />
ייתכן שיש דרך ע"י מצביעים, אני לא בטוח, אבל בכל מקרה הנחיות בתכנות הם ש[u:dxpie7is]<strong>לא עושים בכזה מקרה Structure.</strong>[/u:dxpie7is]</p>
<p dir="auto">הנה הכללים (של מקרוסופט) מתי לעשות Structure, אני פשוט תרגמתי מפה <a href="http://msdn.microsoft.com/en-us/library/ms229017.aspx" target="_blank" rel="noopener noreferrer nofollow ugc">Choosing Between Class and Struct</a>:<br />
[list:dxpie7is]</p>
<ol>
<li>המבנה מייצג לוגית ערך בודד.</li>
<li>סך הזיכרון של השדות עד 16 בתים.</li>
<li>[u:dxpie7is]בלתי ניתן לשינוי[/u:dxpie7is] זה בשביל "למנוע אי הבנות ובאגים".</li>
<li>לא אמור לעבור Boxing (המרה להתייחסות) לעיתים קרובות.<br />
[/list:u:dxpie7is]</li>
</ol>
<p dir="auto">בכל מקרה אחר יש להשתמש במחלקה.<br />
ראה גם: <a href="http://programmers.stackexchange.com/a/92369/112215" target="_blank" rel="noopener noreferrer nofollow ugc">http://programmers.stackexchange.com/a/92369/112215</a></p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב06/04/2014 13:15 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/2802</link><guid isPermaLink="true">https://tchumim.com/post/2802</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 29 Jan 2018 10:45:15 GMT</pubDate></item></channel></rss>