Webinar on Creating Responsive Application using Bootstrap

Do not miss the opportunity, to join this event click link below :

Click To Join Event

Difference between Type-Casting and Converting

Type-Casting:

In a simple word Type-Casting means converting parent type to child type.

Again what does it mean converting parent type to child type :

It means it saying that type casting can only be used when ever we see that their is an relationship between two class or between two classes.

for eg: we know that object class is the base class for any class .

So l store one value inside an object type :

object obj=”SURYA”;

string str=obj;   //Hear it gives an error that can not implicitly convert object type to string type.

 

To get rid of this error we have two solution that are :

soln 1) string str=Convert.ToString(obj);

soln 2) string str= obj as string ;

or

str=(string) obj;   //This is outdated not used any more.

The second solution is all about type casting ,this second solution hear applied because object class and string class has an relation.

So hear it is pretty clear that if we cast  classes then we can only go for type casting.

Converting:

When ever we deal with value type and we required cast then we go for Converting.

Conversion basically used when ever we cast one datatype to another datatype.

for eg: We want to convert string type to int type in this case if you want to go for type cast you get error because int (struct) type and string (Ref) type , hear if you are an c# programmer then to solve this problem you can use a method int.Parse which convert string to int.

eg: string str=”10″;

int i =int.Parse(str);

So From above we understand that when ever cast required for value type then we go for Conversion using different methods ,but when ever cast required for reference i.e class type then we go for Type-cast.

 

Hope this is useful..

If you didn’t satisfy this concept or any wrong is their then you free to comment on it.

Invitation: C# Corner Webinar – Getting Ready with Asp.Net 5 on 12 February 2015 Click Below and Register..

Click Hear For Reg.

Opportunity For Fresher…

Hi,

Greetings !

We are pleased to inform you that ‘Fresher’s Selection drive’ for a Top MNC for 2014 passed out batches will be conducted soon.

Registration is mandatory to participate in these selection drives. There are no charges for registration.

Visit Uclid office for Pre – screening test to enrol for Selection drive.

The eligibility criterion for registration is as under (Mandatory):

*Minimum 10+2+4 years of education (Full Time)
* 2014 batch pass outs in BE/ B.Tech/ ME/ M.Tech / MCA – All streams except bio-related courses, MSc – IT/CS
*First class (60% and above) in 10th, 12th, UG and PG (Full time / Regular courses)
*Excellent communication skills
*Willing to work in 24/7 Shifts & any location
*Should be an Indian national with passport or passport application receipt

If you fulfill the above mentioned criteria, then bring the following documents to the below office for Pre Screening and Registration process.

1. Updated CV – 2 no’s
2. Photographs – 3 no’s
3. All semester mark sheets or consolidated mark sheets and Provisional or Degree Certificate
4. Passport or passport application receipt (Optional)

Venue:
In Hyderabad:
Uclid IT School
301, 3rd floor, Shree Swathi Anukar,
Adjacent Aditya Trade Centre,
Ameerpet, Hyderabad.

In Pune:
Uclid IT Services,
25, Karve Road, 2nd Floor,
Above Bank of Maharashtra,
Next to Ayurveda rasashala,
Near Garware College.
Pune, Maharashtra.
PH: 020-25422244

Registrations can be done between 10.00 am to 5.00 pm on or before 11-FEB-2015.

You can refer / forward this opportunity to any of your friends or any one you know who might be eligible.

Thanks & Regards,
Placement Cell

PS: All 2014 passed out students who fulfill the criteria can register for the drive.