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
Maha
NA
0
324k
Object Data Type
Sep 3 2013 4:02 PM
In the following program if data type is object, GetType() method returning data type is assigned value data type.
If
object
obj4 =
new object
(); then
only
returning data type is
System.Object
.
What is the reason for that?
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int value = 5;
object obj1 = 12;
object obj2 = "Scarborough";
object obj3 = 'A';
object obj4 = new object();
Console.WriteLine(value.GetType());
Console.WriteLine(obj1.GetType());
Console.WriteLine(obj2.GetType());
Console.WriteLine(obj3.GetType());
Console.WriteLine(obj4.GetType());
Console.ReadKey();
}
}
}
/*
System.Int32
System.Int32
System.String
System.Char
System.Object
*/
Reply
Answers (
8
)
Update using Session
Connection to a Face ID device or biometric device