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

C#

 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 4:08
Mark H Bishop17-Dec-11 4:08 
GeneralRe: unmanaged - returning arrays Pin
Luc Pattyn17-Dec-11 4:22
sitebuilderLuc Pattyn17-Dec-11 4:22 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 7:22
Mark H Bishop17-Dec-11 7:22 
AnswerRe: unmanaged - returning arrays Pin
Luc Pattyn17-Dec-11 7:40
sitebuilderLuc Pattyn17-Dec-11 7:40 
GeneralRe: unmanaged - returning arrays Pin
harold aptroot17-Dec-11 5:13
harold aptroot17-Dec-11 5:13 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 7:16
Mark H Bishop17-Dec-11 7:16 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 7:29
Mark H Bishop17-Dec-11 7:29 
QuestionCoolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 11:23
SledgeHammer0116-Dec-11 11:23 
If I'm given a string in the format: aaaaaa.bbb.ccc.ddd....qqq. Basically the string is words seperated by a single dot. Words can be any length and the string can have any number of segments. Think C# namespace.

Now, I want to remove the last segment... so I want to take:

A.B.C.WpfApplication3.Application

and get

A.B.C.WpfApplication3

I know you just reverse find the last . and trim the string there, but I'm wondering if there are any cool tricks with split / join, linq extensions, etc?

Bored, so trying to come up with a one liner Smile | :) ... can't make any assumption that the last part of the string will be .Application either Smile | :) .

But the input IS going to be a namespace + class name. (this.GetType().ToString()).
AnswerRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 11:34
mvePIEBALDconsult16-Dec-11 11:34 
GeneralRe: Coolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 11:44
SledgeHammer0116-Dec-11 11:44 
GeneralRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 11:52
mvePIEBALDconsult16-Dec-11 11:52 
GeneralRe: Coolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 12:06
SledgeHammer0116-Dec-11 12:06 
GeneralRe: Coolest way to do this string operation? Pin
Not Active16-Dec-11 13:54
mentorNot Active16-Dec-11 13:54 
AnswerRe: Coolest way to do this string operation? Pin
AspDotNetDev16-Dec-11 11:50
protectorAspDotNetDev16-Dec-11 11:50 
GeneralRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 11:57
mvePIEBALDconsult16-Dec-11 11:57 
AnswerRe: Coolest way to do this string operation? Pin
AspDotNetDev16-Dec-11 12:05
protectorAspDotNetDev16-Dec-11 12:05 
AnswerRe: Coolest way to do this string operation? Pin
harold aptroot16-Dec-11 12:16
harold aptroot16-Dec-11 12:16 
GeneralRe: Coolest way to do this string operation? Pin
AspDotNetDev16-Dec-11 12:25
protectorAspDotNetDev16-Dec-11 12:25 
GeneralRe: Coolest way to do this string operation? Pin
harold aptroot16-Dec-11 12:37
harold aptroot16-Dec-11 12:37 
GeneralRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 17:38
mvePIEBALDconsult16-Dec-11 17:38 
GeneralRe: Coolest way to do this string operation? Pin
AspDotNetDev16-Dec-11 17:52
protectorAspDotNetDev16-Dec-11 17:52 
AnswerRe: Coolest way to do this string operation? Pin
BillWoodruff16-Dec-11 18:09
professionalBillWoodruff16-Dec-11 18:09 
GeneralRe: Coolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 19:32
SledgeHammer0116-Dec-11 19:32 
GeneralRe: Coolest way to do this string operation? Pin
BillWoodruff16-Dec-11 20:19
professionalBillWoodruff16-Dec-11 20:19 
QuestionHow to deploy thorugh command prompt? Pin
BalasubramanianK15-Dec-11 23:06
BalasubramanianK15-Dec-11 23:06 

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.