LastIndexOf("/"c) -- what is "c" ?

I'm trying to convert some VB to C#, and ive run into a small problem due to my lack of experience with VB.....

below is the VB code:
************************
Dim s As String = entry.Name.ToLower
Dim i As Integer = s.LastIndexOf("/"c)
************************
on the 2nd line, at the end, it has the "/"c ...... what is the "c" there for?
the "literal conversion" to C# of the above is this:
************************
string s = entry.Name.ToLower();
int i = s.LastIndexOf("/"c);
************************
but that "c" at the end causing compiling errors...... so.... im a little confused?

any help would be appriciated.
thanks
0
kuponutcom
6/15/2004 2:41:17 PM
asp.net.visual-basic.net 3721 articles. 0 followers. Follow

1 Replies
1210 Views

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store


One way to do this:

Dim ForwardSlash As Char = CType("/", Char)
Dim s As String = entry.Name.ToLower
Dim i As Integer = s.LastindexOf(ForwardSlash)
0
nightspore
6/15/2004 7:17:30 PM
Reply:

Similar Artilces:

C#.Net "Double" and "double" When/Where to use?
Hi all     Please let me know the difference between "Double" and "double" in c#.Net (I understand that "Double" is structure      and "double" is an instance to that structure) differences if any thing else.     Also the context in which both has been used.(When/Where to use both). thanks all...      hi,my brains says Double is reference type & double is value type.regards,satishKind Attn: If a reply to your post helped you, kindly mark it as Answered.__________...

replace("\","/") in c#
Hi Guys Please can you help me with the above command, I am getting an error CS1010: Newline in constant  this is what i was using temptxt.Replace("\", "/"); thanks in advance hesh   orangelightblub:"\" Didn't test this but I think it should be"\\" or @"\"instead.Grz, Kris. Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. Legend! Thanks Hesh  Hi XIII          Can you explain what is @ in the replace fun...

how to have a "yes", "no", "cancel" in javascript with c#?
 how to use a "yes", "no", "cancel" message box to allow user select. Javascript you have only Yes and Cancel see belowfunction callAlert() {if (confirm('Are you sure you want to Delete?')) {alert("Yes"); } else {alert("No"); } }   To Get Yes No Cancel you will have to use VBScript <script language="VBscript"> ' Buttons Yes, No, and CancelDim box box = MsgBox ("Are You Sure?", 35, "Dialog Title") </script>  MAKMark as Answer if this reply helps youMVP A...

Like "C*" instead of Like "C%"?
I know it's trivial but I'm building programs for a house that has all users who are trained on Informix and Microsoft products. When given a Query By Example, they are used to placing "*" characters in for wildcards. Management complains that teaching them to use "%" in certain instances is going to be a support problem. Is there a way to alter the Powerbuilder wildcard character in a generic way so as to allow for this functionality? Pointers for how others have dealt with this problem are appreciated. Daniel Wynalda <danielw@wybbs.mi.org&g...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Error found "Access to the path "C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers" is denied. "
Hi guys! i'm trying to solve the error "Err Msg: "Object reference not set to an instance of an object" in ASP.NET app" but when i followed the instructions in the http://community.crystaldecisions.com/library/kbase/articles/c2011144.asp link, this error appeared ""Access to the path "C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers" is denied. " What's going on? i already went to the iis to add new virtual directory (CrystalReportWebFormViewer) but different error appeared when i compile and browse my application. pls help ...

Visual Studio "Orcas" Visual Studio.net "2005"
What are Microsoft on weed??? Whidby Orcas Indigo XAML Longhorn What are they trying to do to us developers. The transition to any new tools should be minimal. What we know about WebServices is now old bunk. Why did we bother with .net 1.1???????? Now we need to learn new silly names and new ways of doing things. Yes .net 1.1 is still supported in v2.0. But there are a million and one other needless things that we will have pushed onto us. Only to find in anther two years that they are old hat and there are new radical ways to do what we want.MCAD.Net vb.n...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

Can we call Powerbuilder objects from "C" or "C++" or Java
Hi, We are moving our application to Web. We are using Java and Java beans. Our current application is running on Powerbuilder 6.5. We have very good reports generated in Powerbuilder. We want to call these reports from other middleware and also We want to call powerbuilder objects(business layers written in Userobjects) from C or Java. Please can you suggest me. Can you tell me how can call powerbuilder objects will be usefull in web development. Thanks If you put the NVO's into CORBA components in a Jaguar transaction server, any CORBA complient client can g...

"Me" is better than "You"
Yes I know, strings are frozen. But let me talk about it, I really can't get through the idea of a PC talkin to me. I consider my PC as an extension of myself, not a dumb companion who addresses Me as You. Yes there are times when I get angry with Him while I work and get wrong calculations etc.., but it really is my fault, Me using wrong istructions and eventually wanting to find someone else to blame, but it's Me. And yes, I consider Thunderbird my mail program, reading my mail on my PC as Me. So I personally like to have Me in the header bar as a compact address ...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

"Using" or "With"
Hi all Please can someone enlighten to me as regards the difference with the "Using" and "With" statement when accessing data - which is better, what are the limitations and/or any pointers. Many thanks. Regards DaveDavid WinchesterPlease mark as answer if this is the solution.  using gives you the ability to use the connection and it closes the connection directlly after you finish using it. and there is no need to try- cach - finaly. there is no limitation on using USING keywordMuhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I have a dataobject the re...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

Web resources about - LastIndexOf("/"c) -- what is "c" ? - asp.net.visual-basic.net

Resources last updated: 11/25/2015 2:42:29 AM