Click here to Skip to main content
15,887,392 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# 2010 string PinPopular
Pete O'Hanlon21-Jun-12 12:12
mvePete O'Hanlon21-Jun-12 12:12 
AnswerRe: C# 2010 string PinPopular
Matt T Heffron21-Jun-12 12:15
professionalMatt T Heffron21-Jun-12 12:15 
GeneralRe: C# 2010 string Pin
Peter_in_278021-Jun-12 16:09
professionalPeter_in_278021-Jun-12 16:09 
GeneralRe: C# 2010 string Pin
Pete O'Hanlon21-Jun-12 22:28
mvePete O'Hanlon21-Jun-12 22:28 
GeneralRe: C# 2010 string Pin
kishhr22-Jun-12 6:41
kishhr22-Jun-12 6:41 
GeneralMessage Closed Pin
22-Jun-12 9:45
mvePete O'Hanlon22-Jun-12 9:45 
GeneralRe: C# 2010 string Pin
Matty2224-Jun-12 19:32
Matty2224-Jun-12 19:32 
GeneralRe: C# 2010 string Pin
Pete O'Hanlon25-Jun-12 2:48
mvePete O'Hanlon25-Jun-12 2:48 
So, an even less efficient method to retrieve this then. As the OP hasn't stated they are doing anything else Uri, it's kind of a waste when you end up with this method
C#
public string[] Segments
{
    get
    {
        int index;
        if (this.IsNotAbsoluteUri)
        {
            throw new InvalidOperationException(SR.GetString("net_uri_NotAbsolute"));
        }
        string[] strArray = null;
        if (strArray != null)
        {
            return strArray;
        }
        string privateAbsolutePath = this.PrivateAbsolutePath;
        if (privateAbsolutePath.Length == 0)
        {
            return new string[0];
        }
        ArrayList list = new ArrayList();
        for (int i = 0; i < privateAbsolutePath.Length; i = index + 1)
        {
            index = privateAbsolutePath.IndexOf('/', i);
            if (index == -1)
            {
                index = privateAbsolutePath.Length - 1;
            }
            list.Add(privateAbsolutePath.Substring(i, (index - i) + 1));
        }
        return (string[]) list.ToArray(typeof(string));
    }
} 
I'll be nice though. I won't award you a 1.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: C# 2010 string Pin
Matt T Heffron25-Jun-12 9:37
professionalMatt T Heffron25-Jun-12 9:37 
AnswerRe: C# 2010 string Pin
Abhinav S21-Jun-12 19:42
Abhinav S21-Jun-12 19:42 
AnswerRe: C# 2010 string PinPopular
Richard MacCutchan21-Jun-12 22:40
mveRichard MacCutchan21-Jun-12 22:40 
AnswerRe: C# 2010 string Pin
BobJanova22-Jun-12 3:34
BobJanova22-Jun-12 3:34 
AnswerRe: C# 2010 string Pin
ernesto fazolo22-Jun-12 7:02
ernesto fazolo22-Jun-12 7:02 
QuestionWindows media Player sound output Pin
DArkiii21-Jun-12 7:49
DArkiii21-Jun-12 7:49 
QuestionCurrent process information Pin
a.fatemeh21-Jun-12 4:44
a.fatemeh21-Jun-12 4:44 
AnswerRe: Current process information Pin
Luc Pattyn21-Jun-12 5:27
sitebuilderLuc Pattyn21-Jun-12 5:27 
GeneralRe: Current process information Pin
a.fatemeh21-Jun-12 6:09
a.fatemeh21-Jun-12 6:09 
AnswerRe: Current process information Pin
markovl21-Jun-12 7:14
markovl21-Jun-12 7:14 
GeneralRe: Current process information Pin
a.fatemeh21-Jun-12 7:28
a.fatemeh21-Jun-12 7:28 
AnswerRe: Current process information Pin
markovl21-Jun-12 7:46
markovl21-Jun-12 7:46 
Questionstore SQLite file Pin
nike0721-Jun-12 3:06
nike0721-Jun-12 3:06 
AnswerRe: store SQLite file Pin
Eddy Vluggen21-Jun-12 3:40
professionalEddy Vluggen21-Jun-12 3:40 
QuestionHow to add a player name from one form to another Pin
Member 833684820-Jun-12 17:30
Member 833684820-Jun-12 17:30 
AnswerRe: How to add a player name from one form to another Pin
Mycroft Holmes20-Jun-12 17:36
professionalMycroft Holmes20-Jun-12 17:36 
AnswerRe: How to add a player name from one form to another Pin
OriginalGriff20-Jun-12 20:25
mveOriginalGriff20-Jun-12 20: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.