Sujit Das

Sujit Das

  • NA
  • 1
  • 774

need C# code for following problem

Aug 1 2014 3:56 AM
I wanted to load contents of text files by using button to richtextbox.It is working for english language file but when I was looking for bengali text file its not working....i am giving my codes below..please help me..
 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//using itextsharp.text;
//using iTextsharp.text.pdf;
//using iTextsharp.text.pdf.parser;
namespace tokenizer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Stream Mystream;
OpenFileDialog openfiledialog1 = new OpenFileDialog();
if (openfiledialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
if ((Mystream = openfiledialog1.OpenFile()) != null)
{
string strfilname = openfiledialog1.FileName;
string filetext = File.ReadAllText(strfilname);
richTextBox1.Text = filetext;
}
}
}
}
}
 

Answers (1)