Click here to Skip to main content
15,905,875 members
Home / Discussions / C#
   

C#

 
QuestionUsing Low Level keyboard hook problem [modified] Pin
kamalesh828-Sep-07 12:03
kamalesh828-Sep-07 12:03 
QuestionSingle instance forms in an MDI app Pin
martin_hughes8-Sep-07 9:20
martin_hughes8-Sep-07 9:20 
AnswerRe: Single instance forms in an MDI app [modified] Pin
Ed.Poore8-Sep-07 12:25
Ed.Poore8-Sep-07 12:25 
GeneralRe: Single instance forms in an MDI app [modified] Pin
martin_hughes8-Sep-07 13:38
martin_hughes8-Sep-07 13:38 
GeneralRe: Single instance forms in an MDI app Pin
Ed.Poore8-Sep-07 13:51
Ed.Poore8-Sep-07 13:51 
GeneralRe: Single instance forms in an MDI app Pin
martin_hughes8-Sep-07 14:18
martin_hughes8-Sep-07 14:18 
GeneralRe: Single instance forms in an MDI app Pin
Ed.Poore9-Sep-07 0:19
Ed.Poore9-Sep-07 0:19 
GeneralRe: Single instance forms in an MDI app Pin
martin_hughes9-Sep-07 7:36
martin_hughes9-Sep-07 7:36 
GeneralRe: Single instance forms in an MDI app Pin
Ed.Poore9-Sep-07 9:12
Ed.Poore9-Sep-07 9:12 
GeneralRe: Single instance forms in an MDI app Pin
Ed.Poore9-Sep-07 13:39
Ed.Poore9-Sep-07 13:39 
QuestionNeed an Algorithm like 'Word Wrap' in notepad. Pin
hdv2128-Sep-07 6:54
hdv2128-Sep-07 6:54 
AnswerRe: Need an Algorithm like 'Word Wrap' in notepad. Pin
Giorgi Dalakishvili8-Sep-07 7:26
mentorGiorgi Dalakishvili8-Sep-07 7:26 
QuestionConsuming Java Web Service using C# Pin
arctix8-Sep-07 4:48
arctix8-Sep-07 4:48 
AnswerRe: Consuming Java Web Service using C# Pin
Guffa8-Sep-07 4:58
Guffa8-Sep-07 4:58 
QuestionRe: Consuming Java Web Service using C# [modified] Pin
arctix9-Sep-07 2:57
arctix9-Sep-07 2:57 
QuestionGenerics Problem Question Pin
PaulPrice8-Sep-07 4:44
PaulPrice8-Sep-07 4:44 
Good afternoon gentlemen,

I was hoping somebody could explain what is wrong with the following implementation of a simple Generic function

<br />
protected void SetValue<<T>>(T value, int length)<br />
{<br />
    byte[] data = BitConverter.GetBytes(value);<br />
    if (SrbData.Length < (length + data.Length))<br />
        throw new InvalidOperationException();<br />
    Array.Copy(data, 0, SrbData, length, data.Length);<br />
}<br />


ps, the <<t>> is because I could not work out how to get a single greater than to display and SrbData is a byte array

The Visual Studio error is

Error 1 The best overloaded method match for 'System.BitConverter.GetBytes(bool)' has some invalid arguments C:\Documents and Settings\Paul\My Documents\Visual Studio 2005\Projects\Comet\SrbLibrary\SrbHeader.cs 17 27 SrbLibrary

I do not have much experience with Generics so this is most likely a silly problem, but thanks for the help anyway

Paul
AnswerRe: Generics Problem Question Pin
Giorgi Dalakishvili8-Sep-07 4:49
mentorGiorgi Dalakishvili8-Sep-07 4:49 
GeneralRe: Generics Problem Question Pin
PaulPrice8-Sep-07 4:58
PaulPrice8-Sep-07 4:58 
GeneralRe: Generics Problem Question Pin
Giorgi Dalakishvili8-Sep-07 5:05
mentorGiorgi Dalakishvili8-Sep-07 5:05 
GeneralRe: Generics Problem Question Pin
PaulPrice8-Sep-07 5:11
PaulPrice8-Sep-07 5:11 
GeneralRe: Generics Problem Question Pin
Giorgi Dalakishvili8-Sep-07 5:18
mentorGiorgi Dalakishvili8-Sep-07 5:18 
QuestionAntivirus question Pin
sajid.salim.khan8-Sep-07 4:20
sajid.salim.khan8-Sep-07 4:20 
AnswerRe: Antivirus question Pin
Paul Conrad8-Sep-07 4:26
professionalPaul Conrad8-Sep-07 4:26 
QuestionDataGrid control WinFroms Pin
somagunasekaran8-Sep-07 4:19
somagunasekaran8-Sep-07 4:19 
AnswerRe: DataGrid control WinFroms Pin
Paul Conrad8-Sep-07 4:27
professionalPaul Conrad8-Sep-07 4:27 

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.