C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Copy bytes from one array to another using Buffer Class


Posted Date: 23 Apr 2007    Resource Type: Code Snippets    Category: Collections

Posted By: Balamurali Balaji       Member Level: Diamond
Rating:     Points: 10



This code copies a specified number of bytes (not elements) in an array to another array. The code copies only 2 Int32 elements to the second array as the number of bytes specified is 8.




int[] a1 = new int[5] {12,34,52,15,64};
int[] a2 = new int[5];
System.Buffer.BlockCopy(a1,0,a2,0,8);
foreach (int i in a2)
MessageBox.Show(i.ToString());






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Applying a custom sort to a SortedList
Previous Resource: Iterator,Delegate,Predicates,Anonymous method and Generics C#2.0
Return to Discussion Resource Index
Post New Resource
Category: Collections


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

SPOC

Contact Us    Privacy Policy    Terms Of Use