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
StringComparison
Oct 7 2013 10:32 AM
This program is given in the following website.
http://www.dotnetperls.com/stringcomparison
What is the meaning of the "CurrentCulture" and "InvariantCulture" . Problem is highlighted.
using System;
class Program
{
static void Main()
{
//
// Use the StringComparison enumerated type on the string input.
// ... The *IgnoreCase constants can be used with a lowercase parameter.
// ... Uppercase or mixed-case is fine too.
//
const string input = "Dot Net Perls";
Console.WriteLine(input.IndexOf("Net", StringComparison.Ordinal));
Console.WriteLine(input.IndexOf("net", StringComparison.OrdinalIgnoreCase));
Console.WriteLine(input.IndexOf("Net", StringComparison.
CurrentCulture
));
Console.WriteLine(input.IndexOf("net", StringComparison.CurrentCultureIgnoreCase));
Console.WriteLine(input.IndexOf("Net", StringComparison.
InvariantCulture
));
Console.WriteLine(input.IndexOf("net", StringComparison.InvariantCultureIgnoreCase));
}
}
Reply
Answers (
3
)
how to send email daily
Data Repeater - winapps