Tagged Questions
0
votes
1answer
54 views
Parsing C# dynamic string
I am getting a string returned to my application from my gateway processor. The string contents are:
ssl_result=0
ssl_result_message=APPROVAL
ssl_txn_id=9621F9AD-E49E-4003-91BD-5C1B08569959
...
-3
votes
2answers
61 views
convert string to hex-string in C#
I have a string like "sample". I want to get a string of it in hex format; like this:
"796173767265"
please give C# syntax.
-3
votes
3answers
55 views
how do you reverse a string in C# using LINQ?
I was reading an old post from coding horror (http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html) It's still a very entertaining read, you'll notice a lot of the people ...
-2
votes
3answers
42 views
String to DateTime Convertion of 2013-05-04 13:12:20.123Z [closed]
I need to output this string value (2013-05-04 13:12:20.123Z) to a valid Datetime on this format (dd/MM/yyyy HH:mm:ss).
I tried Convert.ToDateTime, DateTime.ParseExact, DateTime.Parse but its change ...
0
votes
0answers
17 views
Custom InfoPath .NET ActiveX control: String “value” property will not pass back string literal
I'm writing a custom ActiveX control for InfoPath 2010 in C#. I've followed the excellent tutorials at ...
0
votes
2answers
46 views
Replacing a specific character with string.replace()
I'd like to replace all occurences of / to \ . i used this snippet:
_url = _url.Replace("/",@"\");
but it replaces / to \\.
Why this happens? How can i modify the snippet to get a good result
0
votes
2answers
30 views
Is it unsafe to use ToCharArray on a string under mono?
I was doing something like this:
[StructLayout(LayoutKind.Sequential)]
public struct V_REQUEST
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
private string ...
1
vote
5answers
83 views
Reverse a String without using Reverse. It works, but why?
Ok, so a friend of mine asked me to help him out with a string reverse method that can be reused without using String.Reverse (it's a homework assignment for him). Now, I did, below is the code. It ...
1
vote
1answer
53 views
Convert to string, remove some parts and convert back to byte[]
I need to delete the first 4 sentences of a byte[] converted to a string.
What I have so far:
//convert bytearray to string, so I can modify the string
string rawString = ...
0
votes
3answers
67 views
Need to compare string which has one or more word dynamic
I am validation string in c#(Pattern).
The thing is with validation is, it contains one or more word dynamic
For Example :
First String - New Ticket Update- ID:New with Priority:New A New ...
1
vote
4answers
72 views
How I can get the difference by time string and Datetime now?
i want to calculate a checktime to the time now and get the hours.
I have a string "time" for example...
Jun 06 2013 07:23:06
and with DateTime.Now I get the Time now. The Problem is now that i ...
0
votes
4answers
62 views
Remove a some words from a string based on text
I want to remove a name from a string. i have read so many article about it. They are suggesting to maintain an array list to maintain all the names as items. Is there any way to remove the name ...
2
votes
1answer
59 views
System.String.Split(null) doesn't remove whitespace (C#)
I know that System.String.Split(null) should return me a string array with whitespace removed. I've read this post and this MSDN doc, which does not agree with what I'm experiencing.
Here's my code:
...
-1
votes
4answers
85 views
Remove words from string using substring
Is there a method that will remove a set amount of characters from a string, placing the removed characters into a separate string and leaving the original x amount of characters shorter?
I need to ...
-1
votes
1answer
85 views
How to manipulate the string more efficiently by C#?
The Original String
it is made of 3 parts:
1- words (in Chinese) 2- [img]pic url[/img] 3-
[url]url[/url] 4- < br>
So the result is something like below:
...