16,013,747 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11145129 (Top 7 by date)
Member 11145129
31-Oct-14 2:54am
View
is there any problem wid code ...pls help
Member 11145129
31-Oct-14 2:47am
View
energy meter
Member 11145129
16-Oct-14 5:03am
View
about my program :
when i enter value in textbox "abcd1234"
and i click on my button ...it takes )xab,0xcd,0x12,0x34 and store them in a byte aaray and add these values and give result in textbox2.
now,, i need the same thing even i give the input in text box as : "ab cd @ 12 # 34"..
means it must work after any special sybol in the same manner...plz help
Member 11145129
16-Oct-14 4:47am
View
Error 2 Only assignment, call, increment, decrement, and new object expressions can be used as a statement C:\checksum\checksum\Form1.cs 29 48 checksum
Member 11145129
16-Oct-14 4:47am
View
i submitted after removing coversion ....
Member 11145129
16-Oct-14 4:46am
View
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace checksum
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static byte[] FromHex(string hex)
{
byte[] raw = new byte[hex.Length / 2];
for (int i = 0; i < raw.Length; i++)
{
raw[i] =(hex.Substring(i * 2, 2), 16);
}
return raw;
}
private string CalculateChecksum(byte[] str)
{
int check = 0;
foreach (byte chData in str)
{
check += chData;
}
check &= 0xff;
return check.ToString("X2");
}
private void button1_Click(object sender, EventArgs e)
{
string hex= textBox1.Text;
byte[] str;
str = FromHex(hex);
textBox2.Text = CalculateChecksum(str);
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
}
Member 11145129
16-Oct-14 4:29am
View
it's not working ....showing 8 errors
Show More