C# program to demonstrate the example of BlockCopy() method of the array
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Program:
The source code to demonstrate the BlockCopy() method in C# is given below. The given program is compiled and executed successfully on Microsoft Visual Studio.
Output:
Explanation:
In the above program, we created two integer arrays source and destination.
In the above code, we find the total number of bytes. Because Length property returns the number of elements in an array and sizeof(int) return the total bytes occupied by an integer and then we multiplied both values and get total length of an array in bytes.