Need a scenario where would fail Array.ConstrainedCopy()
- by Sir Psycho
Hi,
Just playing around with some of the APIs in .NET and I can't seem to find a way to cause Array.ConstrainedCopy() fail.
According to MSDN, it's treated as an atomic operation. If it fails during the copy, the entire call fails resulting in no elements being copied as opposed to its Array.Copy() counterpart.
Can someone demonstrate this or…