Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: non selectable cells/columns in datagridview Pin
dan!sh 4-Jun-09 23:12
professional dan!sh 4-Jun-09 23:12 
QuestiondataGrid SelectedIndexChanged Method not available in Compact Framework Pin
Paulo Mitchell4-Jun-09 20:27
Paulo Mitchell4-Jun-09 20:27 
AnswerRe: dataGrid SelectedIndexChanged Method not available in Compact Framework Pin
MickCurley5-Jun-09 0:16
MickCurley5-Jun-09 0:16 
GeneralRe: dataGrid SelectedIndexChanged Method not available in Compact Framework Pin
Paulo Mitchell5-Jun-09 3:18
Paulo Mitchell5-Jun-09 3:18 
GeneralRe: dataGrid SelectedIndexChanged Method not available in Compact Framework Pin
MickCurley5-Jun-09 4:05
MickCurley5-Jun-09 4:05 
QuestionBHO not gets injected? Pin
svt gdwl4-Jun-09 20:19
svt gdwl4-Jun-09 20:19 
AnswerThis is the error occured during installation Pin
svt gdwl4-Jun-09 21:14
svt gdwl4-Jun-09 21:14 
QuestionEquivalent C# 2.0 code Pin
Ankit Rajpoot4-Jun-09 18:56
Ankit Rajpoot4-Jun-09 18:56 
I cannot figure out how to translate the following line of code:

int maxMagicBytesLength = imageFormatDecoders.Keys.OrderByDescending(x => x.Length).First().Length;


into equivalent .Net 2.0 (C# 2.0) code.

Here's the declaration of the imageFormatDecoders dictionary:

private static Dictionary<byte[], Func<BinaryReader, Size>> imageFormatDecoders = new Dictionary<byte[], Func<BinaryReader, Size>>()
       {
           { new byte[] { 0x42, 0x4D }, DecodeBitmap },
           { new byte[] { 0x47, 0x49, 0x46, 0x38, 0x37, 0x61 }, DecodeGif },
           { new byte[] { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61 }, DecodeGif },
           { new byte[] { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A }, DecodePng },
           { new byte[] { 0xff, 0xd8 }, DecodeJfif },
       };


As my rest of the application is .net 2.0. I just can't figure out the use of the OrderByDescending() method. I've not worked in C# 3.0 or later versions. Please help me.

Thanks in advance.

Excuse me for buttin' in, but I'm interrupt driven.

AnswerRe: Equivalent C# 2.0 code Pin
Christian Graus4-Jun-09 21:40
protectorChristian Graus4-Jun-09 21:40 
QuestionHow to type special character such as √ ,Π in C#? Pin
tannghia4-Jun-09 17:19
tannghia4-Jun-09 17:19 
AnswerRe: How to type special character such as √ ,Π in C#? Pin
Christian Graus4-Jun-09 17:32
protectorChristian Graus4-Jun-09 17:32 
QuestionAutoscroll DataGridview Control Pin
Member 20251764-Jun-09 16:07
Member 20251764-Jun-09 16:07 
AnswerRe: Autoscroll DataGridview Control Pin
Niladri_Biswas4-Jun-09 16:25
Niladri_Biswas4-Jun-09 16:25 
GeneralRe: Autoscroll DataGridview Control Pin
Christian Graus4-Jun-09 16:26
protectorChristian Graus4-Jun-09 16:26 
AnswerRe: Autoscroll DataGridview Control Pin
Christian Graus4-Jun-09 16:25
protectorChristian Graus4-Jun-09 16:25 
QuestionHow to copy sysDiagrams when copying a database Pin
fiaolle4-Jun-09 8:51
fiaolle4-Jun-09 8:51 
QuestionIs it possible to use VB control in C#? Pin
Seraph_summer4-Jun-09 8:49
Seraph_summer4-Jun-09 8:49 
AnswerRe: Is it possible to use VB control in C#? Pin
DaveyM694-Jun-09 8:53
professionalDaveyM694-Jun-09 8:53 
AnswerRe: Is it possible to use VB control in C#? Pin
0x3c04-Jun-09 9:36
0x3c04-Jun-09 9:36 
GeneralRe: Is it possible to use VB control in C#? Pin
Seraph_summer4-Jun-09 10:08
Seraph_summer4-Jun-09 10:08 
GeneralRe: Is it possible to use VB control in C#? Pin
Dave Kreskowiak4-Jun-09 10:16
mveDave Kreskowiak4-Jun-09 10:16 
GeneralRe: Is it possible to use VB control in C#? Pin
0x3c04-Jun-09 10:24
0x3c04-Jun-09 10:24 
GeneralRe: Is it possible to use VB control in C#? Pin
harold aptroot4-Jun-09 10:45
harold aptroot4-Jun-09 10:45 
GeneralRe: Is it possible to use VB control in C#? Pin
Seraph_summer4-Jun-09 10:27
Seraph_summer4-Jun-09 10:27 
GeneralRe: Is it possible to use VB control in C#? Pin
harold aptroot4-Jun-09 10:53
harold aptroot4-Jun-09 10:53 

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.