GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  DotNet
Go To First  |  Previous Question  |  Next Question 
 DotNet  |  Question 134 of 165    Print  
1) Write an example of implicitly converting an object to string

2) Write an example of explicitly converting an object to string



  
Total Answers and Comments: 2 Last Update: March 16, 2007     Asked by: usha rani P 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 04, 2007 04:59:20   #1  
PavanKumar S        

RE: 1) Write an example of implicitly converting an ob...
DotNet Framework is a completely Object Oriented Model. Everything that is present in .Net(Major Part) are Objects.So we create Objects for the classes and use them. So we are only working with the Objects.Let me make it even more clear with an example :String s; //Here S is an Object Of String Classs Hello Dotnet Programmers ; //Here I am assigning it with a valueHere I am creating a object for the String Class and I am assigning it to a value of string how this hapens is .Net framework inmplicitly converts the Obj To String as per the requirement. And if at all we wanna convert a Object Type to string Type use the .ToString() which would convert the Objet Type To String Type.
 
Is this answer useful? Yes | No
March 16, 2007 08:28:40   #2  
Radhika        

RE: 1) Write an example of implicitly converting an ob...

If a is an object we need to convert it as string just add .ToString() extension.
dim b as string
b a.Tostring()


 
Is this answer useful? Yes | No

 Related Questions


 Sponsored Links

 
Related Articles

ODP.NET - OracleCommand Object

ODP NET More About the OracleCommand Object Till now we have seen OracleCommand working with OracleDataReader OracleCommand is not simply meant for OracleDataReader It has got a lot of functionality for itself Let us see few of the most commonly used features of OracleCommand in this section We will
 

Microsoft AJAX Library - Creating Object Members on the Fly

Creating Object Members on the Fly One major difference between OOP in C and ASP NET and OOP in JavaScript is that JavaScript allows creating object members on the fly" This is true for objects and classes that you create yourself and also for JavaScript s own objects and types as well He
 

Microsoft AJAX Library - Object-Oriented JavaScript

Object Oriented JavaScript Objects and classes are implemented differently in JavaScript than in languages such as C VB NET Java or C However when it comes to using them you ll feel on familiar ground You create objects using the new operator and you call their methods or access their fields using t
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ String Representation and Handling

C String Representation and Handling In this C tutorial you will learn about string representation and handling how is string represented end string notation initializing char array character representation string literals example programe to understand the character array concept and the accessing
 

Object-Oriented Client-Server Internet

Object Oriented Client Server Internet OCSI Environments as IT Infrastructure Client Server Basics Object Oriented Client Server Internet OCSI environments provide the IT infrastructure for supporting OCSI applications For our purposes infrastructure refers to operating systems networks middleware
 

JavaScript String Object

JavaScript String Object In this JavaScript tutorial you will learn about String Object purpose of string object in JavaScript purpose of string object indexof method lastIndexOf method and substring method along with syntax and example mosgoogle center Purpose of String Object in JavaScript The mai
 

JavaScript Date Object

JavaScript Date Object In this JavaScript tutorial you will learn about date object and methods of date object explained along with syntax and example mosgoogle center JavaScript Date Object Usage of Date Object Date object of Java Script is used to work with date and times General syntax for defini
 

Convert a String into an Integer

How to convert a string into an integer in C program? This is done by using the function named as atoi(). This function atoi() is present in the header file named as <stdlib.h>. When programmers use this function they must include the header file by the statement #include <stdl
 

String handling functions

What is the string handling functions present in header file <string.h>? There are number of string handling functions present in string.h. In other words if a programmer uses any of the function present in string.h then they must include the header file as #include <string.h&am
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape