Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
AnswerRe: Alternative to Application.StartupPath Pin
Cracked-Down25-May-12 7:51
Cracked-Down25-May-12 7:51 
GeneralRe: Alternative to Application.StartupPath Pin
MichCl25-May-12 7:54
MichCl25-May-12 7:54 
GeneralRe: Alternative to Application.StartupPath Pin
Richard MacCutchan25-May-12 7:54
mveRichard MacCutchan25-May-12 7:54 
GeneralRe: Alternative to Application.StartupPath Pin
MichCl25-May-12 7:56
MichCl25-May-12 7:56 
GeneralRe: Alternative to Application.StartupPath Pin
Richard MacCutchan25-May-12 7:59
mveRichard MacCutchan25-May-12 7:59 
GeneralRe: Alternative to Application.StartupPath Pin
MichCl25-May-12 8:07
MichCl25-May-12 8:07 
AnswerRe: Alternative to Application.StartupPath Pin
MichCl25-May-12 8:01
MichCl25-May-12 8:01 
Questionerror adding 2 Uint16s stored in a List structure Pin
Terry Price25-May-12 0:58
Terry Price25-May-12 0:58 
Hey guys,

I have 2 lists defined like this within the class 'image':

public List<uint16> data = new List<uint16>();

I'm trying to subtract two the coresponding values of two instances of the list like this:

C#
UInt16 toAdd, lhs, rhs;

for (int i = 0; i < a.data.Count; i++)
{
    lhs = a.data[i];
    rhs = b.data[i];
    toAdd = lhs + rhs;


}



but I get the error:

Error 1 Cannot implicitly convert type 'int' to 'ushort'. An explicit conversion exists (are you missing a cast?) d:\my documents\visual studio 2010\Projects\Contrast Enhanced Subtaction\Contrast Enhanced Subtaction\Program.cs 28 25 Contrast Enhanced Subtaction


Any ideas?
AnswerRe: error adding 2 Uint16s stored in a List structure Pin
Richard MacCutchan25-May-12 1:05
mveRichard MacCutchan25-May-12 1:05 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
harold aptroot25-May-12 1:14
harold aptroot25-May-12 1:14 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
Richard MacCutchan25-May-12 1:33
mveRichard MacCutchan25-May-12 1:33 
AnswerRe: error adding 2 Uint16s stored in a List structure Pin
Luc Pattyn25-May-12 2:17
sitebuilderLuc Pattyn25-May-12 2:17 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
Richard MacCutchan25-May-12 3:32
mveRichard MacCutchan25-May-12 3:32 
AnswerRe: error adding 2 Uint16s stored in a List structure Pin
Luc Pattyn25-May-12 2:21
sitebuilderLuc Pattyn25-May-12 2:21 
AnswerRe: error adding 2 Uint16s stored in a List structure Pin
BobJanova25-May-12 5:50
BobJanova25-May-12 5:50 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
harold aptroot25-May-12 6:01
harold aptroot25-May-12 6:01 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
RobCroll25-May-12 17:11
RobCroll25-May-12 17:11 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
harold aptroot25-May-12 23:05
harold aptroot25-May-12 23:05 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
Richard MacCutchan26-May-12 1:00
mveRichard MacCutchan26-May-12 1:00 
GeneralRe: error adding 2 Uint16s stored in a List structure Pin
harold aptroot26-May-12 1:04
harold aptroot26-May-12 1:04 
Questiongeometry combine Error Pin
mukesh methaniya25-May-12 0:41
mukesh methaniya25-May-12 0:41 
AnswerRe: geometry combine Error Pin
Richard MacCutchan25-May-12 1:07
mveRichard MacCutchan25-May-12 1:07 
QuestionResize Button according to windows form size Pin
sankar456724-May-12 21:51
sankar456724-May-12 21:51 
AnswerRe: Resize Button according to windows form size Pin
Cracked-Down24-May-12 22:07
Cracked-Down24-May-12 22:07 
Questiontake text data frome web Pin
sina rahimzadeh24-May-12 20:45
sina rahimzadeh24-May-12 20:45 

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.