Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
Posted By :
Posted Date :
September 21, 2012
Use Build in function Length
like String.length. it will return int.
You can also find related Interview Question to
How to Find the Length() of string excluding blank spaces?
By using Len( ) method.
select Len ('inthiyaaz ') as length
How to find the Length of a String Including Blank spaces?
By using DataLength( ) method
DataLength function return the number of Characters of the specified string expression,including blank spaces.
select datalength ('inthiyaaz ') as Datalength
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?
The answer is TWO of the above questions
To create a string literal exclude escape sequence
@string. With adding @ at the beginning you can escape literal
String is an...........
String is an Object Type. where other data types are reference type in .NET
Where do you store connection string?
Database connection string can be stored in the web config file.
The connection string can be stored in the WEB.Config file under
What does connection string consist of?
The connection string consists of the following parts:
Server: Whether local or remote.
Uid: User Id (sa-in sql server)
Password: The required password to be filled-in here
Database: The database name.
Difference between String.Empty and ""
The main difference is lies on memory management.
String.Empty will not create any object of string where as "" (Double Quote or Empty Quote) will create a new object in the memory for the checking the objects.
How do I convert a numeric type to a string?
Call Sytem.Object.ToString(). For example, if the variable count is an integer, write the following:
string text = count.ToString();
How you will write a Connection String in web.Config fiel?
Ans) Then write below lines of code:
add name="sqlconnectionstring" connectionString="Data Source=INTHIYAAZ;Initial Catalog=DB;User ID=sa;Password=sa" />
What's the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it's being operated on, a new instance is created.
Which of the following is a fixed length DataType?
CHAR Data type is used when the column lenght is known
To perform asynchronous data access, what must be added to the connection string?
Select Correct Answer.
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend