Click here to Skip to main content
16,016,882 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamicaly moving controls at runtime Pin
Mutty27-Aug-05 6:49
Mutty27-Aug-05 6:49 
AnswerRe: Dynamicaly moving controls at runtime Pin
gnjunge27-Aug-05 7:54
gnjunge27-Aug-05 7:54 
QuestionFind Windows version remotely Pin
notacake27-Aug-05 4:06
notacake27-Aug-05 4:06 
AnswerRe: Find Windows version remotely Pin
Matt Gerrans27-Aug-05 7:02
Matt Gerrans27-Aug-05 7:02 
Questionwhat differences came from 'component' and 'windows form'? Pin
Sasuko27-Aug-05 2:49
Sasuko27-Aug-05 2:49 
QuestionLine Count and Byte Count Pin
Mridang Agarwalla27-Aug-05 2:45
Mridang Agarwalla27-Aug-05 2:45 
AnswerRe: Line Count and Byte Count Pin
FalkoD27-Aug-05 3:22
FalkoD27-Aug-05 3:22 
AnswerRe: Line Count and Byte Count Pin
Mohamad Al Husseiny27-Aug-05 3:39
Mohamad Al Husseiny27-Aug-05 3:39 
To Count line in string
Regex rx=new Regex(Environment.NewLine);
MatchCollection mc=rx.Matches(textBox1.Text);
int lineCount=mc.Count;

Note:if the last two chars of string is not Environment.Newline
the line count will be decreased by 1 so you can check
that last two chars in the string is Environment.NewLine
If not add it
To Get the bytes in string use Encoding class
and select Encoding Format you work with
For Example
int cb=Encoding.UTF8.GetByteCount(textBox1.Text);


MCAD

-- modified at 9:40 Saturday 27th August, 2005
GeneralRe: Line Count and Byte Count Pin
Lord Kixdemp27-Aug-05 12:58
Lord Kixdemp27-Aug-05 12:58 
AnswerRe: Line Count and Byte Count Pin
Guffa27-Aug-05 5:28
Guffa27-Aug-05 5:28 
NewsRe: Line Count and Byte Count Pin
Rei Miyasaka29-Aug-05 13:04
Rei Miyasaka29-Aug-05 13:04 
QuestionC# and Excel Pin
surfman1927-Aug-05 0:39
surfman1927-Aug-05 0:39 
AnswerRe: C# and Excel Pin
Mohamad Al Husseiny27-Aug-05 1:27
Mohamad Al Husseiny27-Aug-05 1:27 
GeneralRe: C# and Excel Pin
surfman1927-Aug-05 1:44
surfman1927-Aug-05 1:44 
QuestionConnecting application with certain filetype Pin
Member 213090427-Aug-05 0:18
Member 213090427-Aug-05 0:18 
AnswerRe: Connecting application with certain filetype Pin
beatles169227-Aug-05 3:03
beatles169227-Aug-05 3:03 
GeneralRe: Connecting application with certain filetype Pin
29-Aug-05 1:58
suss29-Aug-05 1:58 
QuestionWhere is Smart Device Application project? Pin
Libor Tinka26-Aug-05 23:37
Libor Tinka26-Aug-05 23:37 
QuestionWeb Update Pin
StephenMcAllister26-Aug-05 23:25
StephenMcAllister26-Aug-05 23:25 
GeneralRe: Web Update Pin
| Muhammad Waqas Butt |27-Aug-05 4:39
professional| Muhammad Waqas Butt |27-Aug-05 4:39 
AnswerRe: Web Update Pin
Mohamad Al Husseiny27-Aug-05 4:46
Mohamad Al Husseiny27-Aug-05 4:46 
Questionquestion on reference types Pin
Anonymous26-Aug-05 19:53
Anonymous26-Aug-05 19:53 
AnswerRe: question on reference types Pin
leppie26-Aug-05 20:09
leppie26-Aug-05 20:09 
GeneralRe: question on reference types Pin
Anonymous26-Aug-05 20:32
Anonymous26-Aug-05 20:32 
AnswerRe: question on reference types Pin
Guffa26-Aug-05 21:02
Guffa26-Aug-05 21:02 

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.