Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
GeneralRe: Calling C# function in Java Pin
raesa5-May-09 2:02
raesa5-May-09 2:02 
GeneralRe: Calling C# function in Java Pin
Tom Deketelaere5-May-09 2:25
professionalTom Deketelaere5-May-09 2:25 
GeneralRe: Calling C# function in Java Pin
Nagy Vilmos5-May-09 2:29
professionalNagy Vilmos5-May-09 2:29 
QuestionProcess's changes Pin
lost_in_code5-May-09 1:09
lost_in_code5-May-09 1:09 
Questionc# socket server error Pin
Whydah5-May-09 0:49
Whydah5-May-09 0:49 
AnswerRe: c# socket server error Pin
stancrm5-May-09 2:09
stancrm5-May-09 2:09 
GeneralRe: c# socket server error Pin
Whydah5-May-09 3:20
Whydah5-May-09 3:20 
QuestionConvert string to Font Pin
yesu prakash5-May-09 0:48
yesu prakash5-May-09 0:48 
AnswerRe: Convert string to Font Pin
Michael Bookatz5-May-09 1:02
Michael Bookatz5-May-09 1:02 
AnswerRe: Convert string to Font Pin
Baran M5-May-09 3:44
Baran M5-May-09 3:44 
AnswerRe: Convert string to Font Pin
khodadadeh1-Sep-10 14:13
khodadadeh1-Sep-10 14:13 
QuestionFilename check with extention Pin
Yogesh Tayade5-May-09 0:28
Yogesh Tayade5-May-09 0:28 
Hi All,
I have browse button to select a .hex file, this file name should always have 3 underscores and .hex as extention (for eg. TestHex_1_1_1.hex). I had written a code by using split & it works. But if foldername contains any underscore then it will not work.
This is my code.
private void btnOpenFolder1_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
openFileDialog1.ValidateNames = true;
textBox1.Text = openFileDialog1.FileName;

char[] cr ={ '_' };
string[] str = textBox1.Text.Split(cr);

if (str.Length != 4 || textBox1.Text.Substring(textBox1.Text.LastIndexOf("."), 4).ToLower() != ".hex")
{
textBox1.Text = "";
MessageBox.Show("File name or file extention is not valid.");
}
hexPath = textBox1.Text;

}

Please give me any suggestion.
AnswerRe: Filename check with extention Pin
Malmberg5-May-09 0:33
Malmberg5-May-09 0:33 
QuestionDelete line from Excel file Pin
polycom1234-May-09 23:00
polycom1234-May-09 23:00 
AnswerRe: Delete line from Excel file Pin
Christian Graus4-May-09 23:05
protectorChristian Graus4-May-09 23:05 
GeneralRe: Delete line from Excel file Pin
OriginalGriff4-May-09 23:34
mveOriginalGriff4-May-09 23:34 
GeneralRe: Delete line from Excel file Pin
polycom1235-May-09 0:15
polycom1235-May-09 0:15 
GeneralRe: Delete line from Excel file Pin
polycom1235-May-09 0:11
polycom1235-May-09 0:11 
AnswerRe: Delete line from Excel file Pin
Philipp Sumi4-May-09 23:32
Philipp Sumi4-May-09 23:32 
AnswerThe solution Pin
polycom1235-May-09 2:11
polycom1235-May-09 2:11 
GeneralRe: The solution Pin
dan!sh 5-May-09 2:44
professional dan!sh 5-May-09 2:44 
GeneralRe: The solution Pin
Dave Kreskowiak5-May-09 4:43
mveDave Kreskowiak5-May-09 4:43 
QuestionArray Pin
mostafatajamolian4-May-09 22:57
mostafatajamolian4-May-09 22:57 
AnswerRe: Array Pin
Christian Graus4-May-09 23:04
protectorChristian Graus4-May-09 23:04 
AnswerRe: Array Pin
musefan4-May-09 23:25
musefan4-May-09 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.