.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Read a Particular format in text file in C#.net

Posted By: Narayanan     Posted Date: October 13, 2011    Points:5   Category :C#
Hi ,
How to read a particular format in text file in C#.net?I need a method for this read a text file for this example.
Here , you see the four files information.they are not relevant format. How can read this?Please Help me...
For Ex:
File 1 File 2
Lakshmi Narayanan Lakshmi Narayanan
1983-05-02 1983-05-02 10:10:10
File 3 File 4
Lakshmi Narayanan Lakshmi Narayanan
1983-May-02 May-02-1983 10:10:10


Responses
Author: Zakeer             
Posted Date: October 13, 2011     Points: 20   

Hi Narayan,
using System;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string MyString = "A @string & and 2.";

Console.WriteLine(MyString);
for (int charpos = 0; charpos < MyString.Length; charpos++)
{
Console.WriteLine(Char.IsLetter(MyString, charpos));
}
//Keep the console on screen
Console.WriteLine("Press any key to quit.");
Console.ReadKey();
}
}
}

use this to check that file contain char or number then you can split them accordingly.

Regards,
Zakeer

Regards,
Zakeer Ahamed.S
Author: Narayanan             
Posted Date: October 14, 2011     Points: 20   

Hi,
Thanks

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend