You drop deep into the magic that is the runtime on this one.
I would imagine you would have to cause heap fragmentation (and a re-order)
to get this to occur. I am unaware of a deterministic way to have this
happen but I assure you that someone much more in depth with the CLR has
written a blog post. I would check the CLR member blogs to see if you might
be able to find this.
I will try poking around a bit later to see if I can find one .. never had
to do this before but it is interesting :)
Cheers,
Greg Young
MVP - C#
http://geekswith blogs.net/gyoung
"Ant" <An*@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com...
Thanks for your reply. I think I understand why it shouldn't be used,
(managed code shifts the address around) but in practice, I can't seem to
get
it to cause any erroneous results. What situation could cause a problem.
i.e.
How could I set this up to actually see a problem occuring. I've tried it
by
incrementing a local variable but can't seem to see any problems.
It's no big deal but I'm just curious.
Thanks anyway for your ideas & the link.
Ant
"Greg Young" wrote:
I should add that it can be useful when dealing with unsafe code (i.e
pinned
objects).
Cheers,
Greg
"Greg Young" <dr*******************@hotmail.com> wrote in message
news:Oj**************@TK2MSFTNGP04.phx.gbl... > See http://msdn2.microsoft.com/en-us/library/350dyxd0.aspx
>
> The reason why they should not make sense in managed code is that
> objects
> move from place to place in memory. The object you thought was ar
> FF327821
> could be interchanged with another object. The data breakpoint actually
> monitors the memory at a given location.
>
> Cheers,
>
> Greg Young
> MVP - C#
> http://geekswithblogs.net/gyoung
> "Ant" <An*@discussions.microsoft.com> wrote in message
> news:99**********************************@microsof t.com...
>> Hi,
>> I have read recently that
>>
>> "Data break points are not compatible with the common language runtime
>> &
>> cannot be used in C#"
>>
>> By a data breakpoint, it means a point where a value changes to false
>> or
>> simply changes.
>>
>> However, I checked this out & yet the breakpoint occurs if the value
>> changes
>> or evaluates to false if I set it to do so.
>>
>> What does this mean "not compatible" ?
>>
>> Thanks for any thoughts
>> Ant
>
>