I just down load SQL Server 2008 R2 and install it in my system after install it my system I try to Loging As “sa” I got a error Login failed for user "sa" error 18456 I solved that error with help of following post " Login failed for user "sa" error 18456 .After I try to loging using “sa”.After that I got another error "Login failed for user 'username'. Reason: The account is disabled. (Microsoft SQL Server, Error: 18470)".
Login failed for user 'username'. Reason: The account is disabled. (Microsoft SQL Server, Error: 18470)
I just down load SQL Server 2008 R2 and install it in my system after install it my system I try to Loging As “sa” I got a error Login failed for user "sa" error 18456 I solved that error with help of following post " Login failed for user "sa" error 18456 .After I try to loging using “sa”.After that I got another error "Login failed for user 'username'. Reason: The account is disabled. (Microsoft SQL Server, Error: 18470)".
String Split Method Overview
String Split
Split() method Returns a string array
that contains the substrings that are delimited by elements of a specified
string or Unicode character array are given in Split method parameter.
Split string with Char
class Program
{
static void Main(string[] args)
{
string strOrginal =
"Welcome
to Asp.Net"
;
string[] strArray = strOrginal.Split(' ');
foreach (string str in strArray)
{
Console.WriteLine(str);
}
Console.ReadLine();
}
}
Out Put
Welcome
to
Asp.Net
Split string with Char[] - Split(char[] separator)
C# Anonymous Types
What is Anonymous Types?
Anonymous types provide a
convenient way to encapsulate a set of read-only properties into a single
object without having to explicitly define a type first. The type name is
generated by the compiler and is not available at the source code level. The
type of each property is inferred by the compiler.
The following example shows
C# Object and collection initializers
What is Object Initializer?
Object
initializers provide a way to assign values to any accessible fields or
properties of an object at creation time without having to explicitly invoke a
constructor.
First create Employee class
Subscribe to:
Posts (Atom)