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
albert albert
NA
524
0
How to convert one object to onother object
Apr 19 2013 4:48 AM
HI Eveyboyd,
I have this:
2 classes:
Trial License
[code]
public partial class TrialLicense {
}
[/code]
and:
RealLicense:
[code]
public partial class RealLicense {
}
[/code]
And a testUnit:
[code]
[Test]
public void WhenTrialLicenseGoesToRealLicenseThenRealLicenseShouldBeActive()
{
var target = new License(Ecospace);
var targetTrialLicense = new TrialLicense(Ecospace);
var targetRealLicense = new RealLicense(Ecospace);
targetTrialLicense.StartDate = DateTime.Today.AddDays(1);
targetTrialLicense.ExpireDate = DateTime.Today.AddDays(30);
targetRealLicense.ExpireDate = DateTime.Today.AddDays(31);
Assert.IsTrue( Convert.ChangeType(System.Convert(targetTrialLicense), System.Convert(targetRealLicense)));
}
[/code]
Now the scenario goes: after a period of time the TrialLicense goes to the RealLicense. I try to convert the object TrialLicense to the object: RealLicense.
THX.
Reply
Answers (
1
)
About Silverlight
how to add scrollbar in grid view