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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Smart Lucky
NA
555
638.2k
Problem in Assigning one object to other object
Jun 17 2011 2:06 AM
Hi
i am trying to assign one object to other object but it is assigning and showing me this error can any one help me...?
Error
1
Cannot implicitly convert type 'DMLOperationOnArray.Test2' to 'DMLOperationOnArray.Test'
D:\c# Prectice\DMLOperationOnArray\DMLOperationOnArray\Program.cs
70
17
DMLOperationOnArray
using System;
namespace DMLOperationOnArray
{
class Program
{
static void Main(string[] args)
{
Test t = new Test();
t.Testmethod();
Console.Write("\n\n\n");
Test2 t2 = new Test2();
t2.Testmethod2();
t = t2; // error occured here
Console.ReadKey();
}
}
class Test
{
public void Testmethod()
{
int value = 20;
Console.WriteLine(value);
}
}
class Test2
{
public void Testmethod2()
{
int value = 40;
Console.WriteLine(value);
}
}
}
Reply
Answers (
4
)
required field validator in asp.net
call windows openwith /choose program window from c# application