TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Copy Object in C#
Rajan Singh
Jun 06
2015
Code
932
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System.IO;
using
System;
class
ObjectCopy
{
static
void
Main(
string
[] args)
{
int
[] rollnumbers = {100, 200};
int
[] numbers = rollnumbers;
numbers[0] = 300;
Console.WriteLine(
"Roll Number {0}"
, rollnumbers[0]);
}
}
Output:
Roll Number 300
Copy Oject in c#
C#