Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: [C#] Delegate problem Pin
Ian Shlasko16-Apr-10 4:50
Ian Shlasko16-Apr-10 4:50 
QuestionHow to spliting a string Pin
mrkeivan16-Apr-10 1:01
mrkeivan16-Apr-10 1:01 
AnswerRe: How to spliting a string [modified] Pin
Neh.C16-Apr-10 1:18
Neh.C16-Apr-10 1:18 
GeneralRe: How to spliting a string Pin
#realJSOP16-Apr-10 1:41
professional#realJSOP16-Apr-10 1:41 
GeneralRe: How to spliting a string Pin
Neh.C16-Apr-10 2:09
Neh.C16-Apr-10 2:09 
AnswerRe: How to spliting a string Pin
Abhinav S16-Apr-10 1:32
Abhinav S16-Apr-10 1:32 
GeneralRe: How to spliting a string Pin
ramzg16-Apr-10 1:37
ramzg16-Apr-10 1:37 
AnswerRe: How to spliting a string Pin
#realJSOP16-Apr-10 1:47
professional#realJSOP16-Apr-10 1:47 
I have to ask - what does the string represent? A series of flags?

If so, you could convert it to an integer, and then access it with logical AND (&) and logical OR (|) operators. Math operations are always faster/more efficient than string operations.

To convert the string to an int, do this:

string myString = "10101010";
int flags = Convert.ToInt32(myString, 2);


At that point, you can do this:

int myVal = 4;
if ((myVal & flags) == myVal)
{
    // do something if 4 is a set value
}

.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

GeneralRe: How to spliting a string Pin
mrkeivan16-Apr-10 1:56
mrkeivan16-Apr-10 1:56 
GeneralRe: How to spliting a string Pin
Ian Shlasko16-Apr-10 4:13
Ian Shlasko16-Apr-10 4:13 
GeneralRe: How to spliting a string Pin
Not Active16-Apr-10 1:57
mentorNot Active16-Apr-10 1:57 
GeneralRe: How to spliting a string Pin
mrkeivan18-Apr-10 4:27
mrkeivan18-Apr-10 4:27 
QuestionStorage Card in csharp smart device Pin
Tunisien8616-Apr-10 0:36
Tunisien8616-Apr-10 0:36 
AnswerRe: Storage Card in csharp smart device Pin
Eddy Vluggen16-Apr-10 3:17
professionalEddy Vluggen16-Apr-10 3:17 
GeneralRe: Storage Card in csharp smart device Pin
Tunisien8616-Apr-10 6:44
Tunisien8616-Apr-10 6:44 
GeneralRe: Storage Card in csharp smart device Pin
Eddy Vluggen16-Apr-10 8:08
professionalEddy Vluggen16-Apr-10 8:08 
AnswerRe: Storage Card in csharp smart device Pin
Tunisien8619-Apr-10 5:12
Tunisien8619-Apr-10 5:12 
QuestionHow to create an empty tableAdapter or deliver a tableAdapter to extern function Pin
Robert König16-Apr-10 0:13
Robert König16-Apr-10 0:13 
AnswerRe: How to create an empty tableAdapter or deliver a tableAdapter to extern function Pin
Morgs Morgan16-Apr-10 10:06
Morgs Morgan16-Apr-10 10:06 
GeneralRe: How to create an empty tableAdapter or deliver a tableAdapter to extern function Pin
Robert König19-Apr-10 2:45
Robert König19-Apr-10 2:45 
Questionload dataGrid C# Pin
toto_201015-Apr-10 23:29
toto_201015-Apr-10 23:29 
AnswerRe: load dataGrid C# Pin
mrkeivan16-Apr-10 1:01
mrkeivan16-Apr-10 1:01 
QuestionRe: load dataGrid C# Pin
toto_201016-Apr-10 1:58
toto_201016-Apr-10 1:58 
AnswerRe: load dataGrid C# Pin
Morgs Morgan16-Apr-10 2:41
Morgs Morgan16-Apr-10 2:41 
GeneralRe: load dataGrid C# Pin
toto_201016-Apr-10 4:20
toto_201016-Apr-10 4:20 

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.