c# - Problem with Index of in Substring array -
profilepagelist string array each string containing pageid, pagename , pagecontent separated group of characters (#$%). asp.net application using c#
foreach (string item in profilepagelist) { string pagecontent = ""; string pagename = ""; string pageid = ""; *** > part wrong. me here *** pageid = item.substring(0, item.indexof('#$%') + 2); pagecontent = item.substring(item.indexof('#$%') + 1); pagename = item.substring(0, item.indexof('#$%')); callsomefunction(pageid , pagename, pagecontent); }
input string helloo#$%<p>how you??</p>#$%74396
i dont understand how use substring. can me please!! lot in advance..
have @ these:
http://msdn.microsoft.com/en-us/library/system.string.substring(v=vs.71).aspx
and
http://csharp.net-informations.com/string/csharp-string-substring.htm
but think you're trying this:
string[] substrings = inputstring.split("#$%");
anyway, data structure using -- cramming data strings -- rather convoluted. why not use proper objects?
Comments
Post a Comment