Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
AnswerRe: notification of property change. Pin
microsoc11-May-06 23:39
microsoc11-May-06 23:39 
Questioni can't add ou to AD Pin
seelancer11-May-06 22:45
seelancer11-May-06 22:45 
QuestionHelp need in OpenFileDialog Pin
Ashraj198211-May-06 21:23
Ashraj198211-May-06 21:23 
AnswerRe: Help need in OpenFileDialog Pin
Stefan Troschuetz11-May-06 21:28
Stefan Troschuetz11-May-06 21:28 
GeneralRe: Help need in OpenFileDialog Pin
Ashraj198211-May-06 21:38
Ashraj198211-May-06 21:38 
AnswerRe: Help need in OpenFileDialog Pin
Guffa11-May-06 21:57
Guffa11-May-06 21:57 
GeneralRe: Help need in OpenFileDialog Pin
J4amieC11-May-06 21:58
J4amieC11-May-06 21:58 
GeneralRe: Help need in OpenFileDialog Pin
NaNg1524111-May-06 22:10
NaNg1524111-May-06 22:10 
well... I use a little longer way, but I think there is a shorter way, but I don't know it... so here is my way:

file = select_file.FileName.Substring(select_file.FileName.LastIndexOf("\\") + 1, select_file.FileName.Length - select_file.FileName.LastIndexOf("\\") - 5); // -5 = -4 - 3 letters of ending (you can cancel that if you want the ending) and 1 dot, and -1 - for the +1 we do in the first parameter to cancel the \ in the start.

---- modified ----
the other way is better (as they told you here).
if you didn't see the examples so look here:

file = System.IO.Path.GetFileName(select_file.FileName); // Will retrive the file's name with extension<br />
file = System.IO.Path.GetFileNameWithoutExtension(select_file.FileName); // Will retrive the file's name with out extension


-- modified at 4:12 Friday 12th May, 2006
GeneralRe: Help need in OpenFileDialog Pin
Stefan Troschuetz11-May-06 22:15
Stefan Troschuetz11-May-06 22:15 
GeneralRe: Help need in OpenFileDialog Pin
Stefan Troschuetz11-May-06 22:16
Stefan Troschuetz11-May-06 22:16 
AnswerRe: Help need in OpenFileDialog Pin
nikeshkumar11-May-06 22:47
nikeshkumar11-May-06 22:47 
GeneralRe: Help need in OpenFileDialog Pin
J4amieC11-May-06 23:07
J4amieC11-May-06 23:07 
QuestionError from dll Pin
pirogramci11-May-06 21:08
pirogramci11-May-06 21:08 
AnswerRe: Error from dll Pin
Shailen Sukul11-May-06 21:11
Shailen Sukul11-May-06 21:11 
AnswerRe: Error from dll Pin
leppie11-May-06 21:53
leppie11-May-06 21:53 
AnswerRe: Error from dll Pin
ShailenSukul15-May-06 1:29
ShailenSukul15-May-06 1:29 
QuestionCan't open ASP.NET Pin
Mamphekgo11-May-06 21:04
Mamphekgo11-May-06 21:04 
AnswerRe: Can't open ASP.NET Pin
leppie11-May-06 21:54
leppie11-May-06 21:54 
GeneralRe: Can't open ASP.NET Pin
Mamphekgo11-May-06 23:14
Mamphekgo11-May-06 23:14 
QuestionThreading Problem Pin
Jonathan Masters11-May-06 20:31
Jonathan Masters11-May-06 20:31 
AnswerRe: Threading Problem Pin
S. Senthil Kumar11-May-06 21:14
S. Senthil Kumar11-May-06 21:14 
Questionsocket communications between native and managed apps Pin
GDavy11-May-06 20:29
GDavy11-May-06 20:29 
AnswerRe: socket communications between native and managed apps Pin
S. Senthil Kumar11-May-06 21:59
S. Senthil Kumar11-May-06 21:59 
Questionweb browser application in framework 1.1 Pin
ranandbe11-May-06 20:19
ranandbe11-May-06 20:19 
AnswerRe: web browser application in framework 1.1 Pin
KrIstOfK11-May-06 23:32
KrIstOfK11-May-06 23:32 

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.