Click here to Skip to main content
15,890,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: GetDriveName in C# Pin
Ben Fair22-Jan-09 4:34
Ben Fair22-Jan-09 4:34 
GeneralRe: GetDriveName in C# Pin
EliottA22-Jan-09 5:01
EliottA22-Jan-09 5:01 
QuestionHow do i retrieve the directory of multiple images file without hard code ? Pin
Lim Yuxuan22-Jan-09 3:45
Lim Yuxuan22-Jan-09 3:45 
AnswerRe: How do i retrieve the directory of multiple images file without hard code ? Pin
Ben Fair22-Jan-09 4:11
Ben Fair22-Jan-09 4:11 
GeneralRe: How do i retrieve the directory of multiple images file without hard code ? Pin
Lim Yuxuan22-Jan-09 15:13
Lim Yuxuan22-Jan-09 15:13 
QuestionHow to upload an email in to VSS through Dotnet coding Pin
mforMurali22-Jan-09 2:43
mforMurali22-Jan-09 2:43 
AnswerRe: How to upload an email in to VSS through Dotnet coding Pin
Wendelius22-Jan-09 3:17
mentorWendelius22-Jan-09 3:17 
QuestionHow to count a string for \ character? Pin
Matjaz-xyz22-Jan-09 2:08
Matjaz-xyz22-Jan-09 2:08 
Hi. I just cant get this to work right! Frown | :(

I tried two ways... yeah... only one is correct... but the returned value is not correct.

This is my function:

public void DoYourThingBaby()
        {
            string pot = @Application.StartupPath + @"\" + lstFILES.SelectedItem;
            StreamReader sr = new StreamReader(pot);
            string tempF = sr.ReadToEnd();
            sr.Close();

            char[] tempC = tempF.ToCharArray();

// this
            int stevc=0;
            foreach(char chr in tempC)
                if(chr=='\')
                    stevc++;

// or this
            label1.Text = Convert.ToString(tempF.IndexOf(@"\", 30));
        }


the code counts something... but its not the right characters.
i tried it with my file. if i count it in ultraedit - there are 18 characters '\'.
with my application - around 300 Big Grin | :-D

help please Smile | :) ?

thanks in advance

Regards,
Matjaž

AnswerRe: How to count a string for \ character? Pin
Rob Philpott22-Jan-09 2:23
Rob Philpott22-Jan-09 2:23 
AnswerRe: How to count a string for \ character? Pin
Matjaz-xyz22-Jan-09 2:36
Matjaz-xyz22-Jan-09 2:36 
GeneralRe: How to count a string for \ character? Pin
J4amieC22-Jan-09 2:41
J4amieC22-Jan-09 2:41 
GeneralRe: How to count a string for \ character? Pin
Matjaz-xyz22-Jan-09 3:48
Matjaz-xyz22-Jan-09 3:48 
GeneralRe: How to count a string for \ character? Pin
Ben Fair22-Jan-09 4:31
Ben Fair22-Jan-09 4:31 
AnswerRe: How to count a string for \ character? Pin
Jon Rista22-Jan-09 4:58
Jon Rista22-Jan-09 4:58 
AnswerRe: How to count a string for \ character? [modified] Pin
Luc Pattyn22-Jan-09 9:26
sitebuilderLuc Pattyn22-Jan-09 9:26 
Questionhow to make a value in an excel cell read only using c#? Pin
abhiram_nayan22-Jan-09 1:54
abhiram_nayan22-Jan-09 1:54 
AnswerRe: how to make a value in an excel cell read only using c#? Pin
Dave Kreskowiak22-Jan-09 7:06
mveDave Kreskowiak22-Jan-09 7:06 
GeneralRe: how to make a value in an excel cell read only using c#? Pin
abhiram_nayan22-Jan-09 19:17
abhiram_nayan22-Jan-09 19:17 
GeneralRe: how to make a value in an excel cell read only using c#? Pin
Dave Kreskowiak23-Jan-09 2:26
mveDave Kreskowiak23-Jan-09 2:26 
GeneralRe: how to make a value in an excel cell read only using c#? Pin
abhiram_nayan23-Jan-09 2:47
abhiram_nayan23-Jan-09 2:47 
GeneralRe: how to make a value in an excel cell read only using c#? Pin
Dave Kreskowiak23-Jan-09 13:45
mveDave Kreskowiak23-Jan-09 13:45 
QuestionNeed help to implement PROGRAMABLE KEYBORD WITH CREADIT CARD Pin
sharetuto22-Jan-09 1:46
sharetuto22-Jan-09 1:46 
AnswerRe: Need help to implement PROGRAMABLE KEYBORD WITH CREADIT CARD Pin
PC Player22-Jan-09 6:31
PC Player22-Jan-09 6:31 
QuestionNeed help to implement PROGRAMABLE KEYBORD WITH CREADIT CARD Pin
sharetuto22-Jan-09 1:46
sharetuto22-Jan-09 1:46 
AnswerRe: Need help to implement PROGRAMABLE KEYBORD WITH CREADIT CARD Pin
DaveyM6922-Jan-09 1:58
professionalDaveyM6922-Jan-09 1:58 

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.