Click here to Skip to main content
15,916,091 members
Home / Discussions / C#
   

C#

 
QuestionResize Image in Richtexbox Pin
rkcsharp3-Aug-07 5:36
rkcsharp3-Aug-07 5:36 
AnswerRe: Resize Image in Richtexbox Pin
Big Daddy Farang3-Aug-07 8:21
Big Daddy Farang3-Aug-07 8:21 
GeneralRe: Resize Image in Richtexbox Pin
rkcsharp3-Aug-07 13:24
rkcsharp3-Aug-07 13:24 
GeneralRe: Resize Image in Richtexbox Pin
Big Daddy Farang4-Aug-07 7:06
Big Daddy Farang4-Aug-07 7:06 
GeneralRe: Resize Image in Richtexbox Pin
rkcsharp5-Aug-07 16:47
rkcsharp5-Aug-07 16:47 
GeneralRe: Resize Image in Richtexbox Pin
Big Daddy Farang7-Aug-07 9:57
Big Daddy Farang7-Aug-07 9:57 
GeneralRe: Resize Image in Richtexbox Pin
rkcsharp8-Aug-07 6:02
rkcsharp8-Aug-07 6:02 
Questiondefault / local smtp Pin
Marcel Vreuls (www.agentbase.nl)3-Aug-07 5:00
Marcel Vreuls (www.agentbase.nl)3-Aug-07 5:00 
AnswerRe: default / local smtp Pin
led mike3-Aug-07 5:24
led mike3-Aug-07 5:24 
GeneralRe: default / local smtp Pin
Marcel Vreuls (www.agentbase.nl)3-Aug-07 5:29
Marcel Vreuls (www.agentbase.nl)3-Aug-07 5:29 
AnswerRe: default / local smtp Pin
Zoltan Balazs3-Aug-07 6:54
Zoltan Balazs3-Aug-07 6:54 
AnswerRe: default / local smtp Pin
Dave Kreskowiak3-Aug-07 8:05
mveDave Kreskowiak3-Aug-07 8:05 
AnswerRe: default / local smtp Pin
Guffa3-Aug-07 9:07
Guffa3-Aug-07 9:07 
GeneralRe: default / local smtp Pin
Marcel Vreuls (www.agentbase.nl)3-Aug-07 9:33
Marcel Vreuls (www.agentbase.nl)3-Aug-07 9:33 
QuestionhelpProvider Pin
RussBus3-Aug-07 4:39
RussBus3-Aug-07 4:39 
QuestionHow to merge rows in datagrid Pin
vamsimohan213-Aug-07 4:26
vamsimohan213-Aug-07 4:26 
AnswerRe: How to merge rows in datagrid Pin
Blue_Boy3-Aug-07 5:26
Blue_Boy3-Aug-07 5:26 
Questionupdating a combobox entry Pin
cignox13-Aug-07 4:26
cignox13-Aug-07 4:26 
AnswerRe: updating a combobox entry Pin
pmarfleet3-Aug-07 5:04
pmarfleet3-Aug-07 5:04 
AnswerRe: updating a combobox entry Pin
Malcolm Smart3-Aug-07 5:16
Malcolm Smart3-Aug-07 5:16 
Questionshort[] to int[] -- Generic? Overload? Pin
PhilDanger3-Aug-07 4:22
PhilDanger3-Aug-07 4:22 
Hi,

I've inherited a batch of functions whose signatures differ only in the fact that one group takes a short[] as the first parameter and one takes an int[] as the first parameter. I'd like to merge the bulk of the code into one function so that changes don't have to be replicated accross versions (there already is some code difference, but no functional difference!). My two ideas were: to use a generic method, or to have one of the overloaded versions call the other version.

The problem with the first (generics) is that I only want it to be able to accept int[] or short[], not some other type, and there are some explicit assignments such as "shortArray[i] = -12345;" that the compiler doesn't appreciate when I try to make it generic.

The problem with the second, is that I cannot figure out how to convert from a short[] to an int[] without copying to another array and converting it in the loop (.CopyTo), the arrays are massive, so every time I have to copy is a performance hit (it isn't exactly performance critical at the moment, but I'd like to avoid needless operations right now to save time later during optimization).

Any suggestions?

Thanks,

Phil
AnswerRe: short[] to int[] -- Generic? Overload? Pin
Pete O'Hanlon3-Aug-07 4:31
mvePete O'Hanlon3-Aug-07 4:31 
GeneralRe: short[] to int[] -- Generic? Overload? Pin
PhilDanger3-Aug-07 4:46
PhilDanger3-Aug-07 4:46 
GeneralRe: short[] to int[] -- Generic? Overload? Pin
Pete O'Hanlon3-Aug-07 5:07
mvePete O'Hanlon3-Aug-07 5:07 
AnswerRe: short[] to int[] -- Generic? Overload? Pin
Luc Pattyn3-Aug-07 5:50
sitebuilderLuc Pattyn3-Aug-07 5:50 

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.