Click here to Skip to main content
15,910,083 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to add keyboard handling for shortcuts? Pin
Luc Pattyn16-Apr-07 8:40
sitebuilderLuc Pattyn16-Apr-07 8:40 
QuestionHow to get a code of pressed key ? Pin
Saikek16-Apr-07 6:49
Saikek16-Apr-07 6:49 
AnswerRe: How to get a code of pressed key ? Pin
Russell Jones16-Apr-07 7:15
Russell Jones16-Apr-07 7:15 
AnswerRe: How to get a code of pressed key ? Pin
kifahhk16-Apr-07 7:21
kifahhk16-Apr-07 7:21 
AnswerRe: How to get a code of pressed key ? Pin
Luc Pattyn16-Apr-07 9:36
sitebuilderLuc Pattyn16-Apr-07 9:36 
GeneralRe: How to get a code of pressed key ? Pin
Saikek16-Apr-07 21:02
Saikek16-Apr-07 21:02 
Questionhow to create handle in C#.NET Pin
Software_Specialist16-Apr-07 4:54
Software_Specialist16-Apr-07 4:54 
AnswerRe: how to create handle in C#.NET Pin
Colin Angus Mackay16-Apr-07 5:02
Colin Angus Mackay16-Apr-07 5:02 
A handel is just a pointer to something. Usually a void*


Software_Specialist wrote:
CLASSNAME::create("abc", handle);


In C# you'd do this as a static method on a class
public static void Create(string someValue, out object handle)
{
}

Now, if you want to know about this for some interop stuff then a handle is usually an IntPtr in C#

However, this is less than best practice for a .NET application. If you are not doing interop, but you want a factory method you are better doing something like this:

public static Classname Create(string someValue)
{
    Classname result = new Classname();
    // Do other stuff.
    return result;
}



Upcoming events:
* Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services...

Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton


My website

QuestionSimple question about mandatory override Pin
Christopher Stratmann16-Apr-07 4:43
Christopher Stratmann16-Apr-07 4:43 
AnswerRe: Simple question about mandatory override Pin
Tristan Rhodes16-Apr-07 4:52
Tristan Rhodes16-Apr-07 4:52 
Questionget,set methods Pin
Kushi Bobby16-Apr-07 3:21
Kushi Bobby16-Apr-07 3:21 
AnswerRe: get,set methods Pin
sujithkumarsl16-Apr-07 3:54
sujithkumarsl16-Apr-07 3:54 
GeneralRe: get,set methods Pin
blackjack215016-Apr-07 4:07
blackjack215016-Apr-07 4:07 
GeneralRe: get,set methods Pin
Colin Angus Mackay16-Apr-07 4:31
Colin Angus Mackay16-Apr-07 4:31 
GeneralRe: get,set methods Pin
Thomas Stockwell16-Apr-07 10:45
professionalThomas Stockwell16-Apr-07 10:45 
GeneralRe: get,set methods Pin
Luc Pattyn16-Apr-07 4:18
sitebuilderLuc Pattyn16-Apr-07 4:18 
Questionset this object to null Pin
Matglas16-Apr-07 2:51
Matglas16-Apr-07 2:51 
AnswerRe: set this object to null Pin
_mubashir16-Apr-07 3:07
_mubashir16-Apr-07 3:07 
QuestionRe: set this object to null Pin
Matglas16-Apr-07 3:14
Matglas16-Apr-07 3:14 
AnswerRe: set this object to null Pin
Colin Angus Mackay16-Apr-07 3:20
Colin Angus Mackay16-Apr-07 3:20 
AnswerRe: set this object to null Pin
Luc Pattyn16-Apr-07 3:26
sitebuilderLuc Pattyn16-Apr-07 3:26 
AnswerRe: set this object to null Pin
Colin Angus Mackay16-Apr-07 3:18
Colin Angus Mackay16-Apr-07 3:18 
QuestionRe: set this object to null Pin
Matglas16-Apr-07 3:31
Matglas16-Apr-07 3:31 
AnswerRe: set this object to null Pin
Dan Neely16-Apr-07 3:37
Dan Neely16-Apr-07 3:37 
GeneralRe: set this object to null Pin
Matglas16-Apr-07 3:50
Matglas16-Apr-07 3: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.