Click here to Skip to main content
15,914,943 members
Home / Discussions / C#
   

C#

 
AnswerRe: Search and Replace in Word Pin
Nick Parker12-Jan-06 14:19
protectorNick Parker12-Jan-06 14:19 
QuestionDatabase Microsoft Access Pin
Sasuko12-Jan-06 12:36
Sasuko12-Jan-06 12:36 
AnswerRe: Database Microsoft Access Pin
Christian Graus12-Jan-06 12:49
protectorChristian Graus12-Jan-06 12:49 
GeneralRe: Database Microsoft Access Pin
Daniel Santillanes12-Jan-06 13:02
professionalDaniel Santillanes12-Jan-06 13:02 
GeneralRe: Database Microsoft Access Pin
Christian Graus12-Jan-06 13:07
protectorChristian Graus12-Jan-06 13:07 
GeneralRe: Database Microsoft Access Pin
Daniel Santillanes12-Jan-06 13:12
professionalDaniel Santillanes12-Jan-06 13:12 
AnswerRe: Database Microsoft Access Pin
pliu_200012-Jan-06 13:34
pliu_200012-Jan-06 13:34 
QuestionOptimization of unsafe code Pin
Robert Rohde12-Jan-06 12:26
Robert Rohde12-Jan-06 12:26 
Hi,

I have the following code in an unsafe section of code:
C#
//...
int scan0 = data.Scan0.ToInt32();

byte * colPixel;
byte * rowPixel;

byte innerColorB = innerColor.B;
byte innerColorG = innerColor.G;
byte innerColorR = innerColor.R;
byte innerColorA = innerColor.A;

int stride = data.Stride;

for (int y = 0; y < height; y ++)
{
	rowPixel = (byte *)(scan0 + y * stride);
	for (int x = 0; x < width; x++)
	{
		colPixel = rowPixel + 4 * x;
		*colPixel = innerColorB;
		*(colPixel + 1) = innerColorG;
		*(colPixel + 2) = innerColorR;
		*(colPixel + 3) = innerColorA;
	}
}
//...

I'm basically setting all pixels of a bitmap to a specified color. I know I could use the FillRectangle function but I don't want to Smile | :) .

My question is if anyone here might have an idea how this could be performed better/faster.
AnswerRe: Optimization of unsafe code Pin
Christian Graus12-Jan-06 12:48
protectorChristian Graus12-Jan-06 12:48 
GeneralRe: Optimization of unsafe code Pin
Robert Rohde12-Jan-06 13:58
Robert Rohde12-Jan-06 13:58 
GeneralRe: Optimization of unsafe code Pin
Christian Graus12-Jan-06 14:01
protectorChristian Graus12-Jan-06 14:01 
QuestionWNetAddConnection2A & Web Services Pin
Guinness4Strength12-Jan-06 11:58
Guinness4Strength12-Jan-06 11:58 
AnswerRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak12-Jan-06 15:42
mveDave Kreskowiak12-Jan-06 15:42 
GeneralRe: WNetAddConnection2A & Web Services Pin
Guinness4Strength13-Jan-06 11:37
Guinness4Strength13-Jan-06 11:37 
GeneralRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak13-Jan-06 15:12
mveDave Kreskowiak13-Jan-06 15:12 
GeneralRe: WNetAddConnection2A & Web Services Pin
Guinness4Strength14-Jan-06 10:28
Guinness4Strength14-Jan-06 10:28 
GeneralRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak14-Jan-06 15:34
mveDave Kreskowiak14-Jan-06 15:34 
GeneralRe: WNetAddConnection2A & Web Services Pin
Guinness4Strength14-Jan-06 18:33
Guinness4Strength14-Jan-06 18:33 
GeneralRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak15-Jan-06 4:28
mveDave Kreskowiak15-Jan-06 4:28 
GeneralRe: WNetAddConnection2A & Web Services Pin
Guinness4Strength15-Jan-06 4:53
Guinness4Strength15-Jan-06 4:53 
QuestionDataGrid update Pin
AlbePes12-Jan-06 11:43
AlbePes12-Jan-06 11:43 
QuestionGridView COntrol / C# 2005 / ASP.NET Pin
kishanb12-Jan-06 11:17
kishanb12-Jan-06 11:17 
Questionweb-testing with c# Pin
James Brown12-Jan-06 10:40
James Brown12-Jan-06 10:40 
QuestionNested Multi Colump Weekly Planner Report in CR.Net Pin
Kaazim12-Jan-06 10:12
Kaazim12-Jan-06 10:12 
QuestionVisual C# 2005 Express: Database Project Question Pin
OMalleyW12-Jan-06 8:01
OMalleyW12-Jan-06 8:01 

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.