Click here to Skip to main content
15,921,884 members
Home / Discussions / C#
   

C#

 
GeneralRe: CultureInfo and DateTime.parse Pin
OriginalGriff14-Feb-11 1:36
mveOriginalGriff14-Feb-11 1:36 
GeneralRe: CultureInfo and DateTime.parse Pin
Paul E Davies14-Feb-11 4:26
Paul E Davies14-Feb-11 4:26 
GeneralRe: CultureInfo and DateTime.parse Pin
OriginalGriff14-Feb-11 9:04
mveOriginalGriff14-Feb-11 9:04 
GeneralRe: CultureInfo and DateTime.parse Pin
Paul E Davies14-Feb-11 21:51
Paul E Davies14-Feb-11 21:51 
Questionsound on btn clik Pin
aeman11-Feb-11 2:28
aeman11-Feb-11 2:28 
AnswerRe: sound on btn clik Pin
OriginalGriff11-Feb-11 2:41
mveOriginalGriff11-Feb-11 2:41 
GeneralRe: sound on btn clik Pin
aeman11-Feb-11 4:06
aeman11-Feb-11 4:06 
AnswerRe: sound on btn clik Pin
OriginalGriff11-Feb-11 4:41
mveOriginalGriff11-Feb-11 4:41 
aeman wrote:
what would i place in get and set?


Nothing: It is called an "Automatically Implemented Property" (type "prop" in Visual studio, then press TAB twice and it will create it for you).
The compiler automatically creates a virtual variable to hold the data, you access it via the property name.
In this case it is the equivalent of:
private static string keyClickSoundFile;
public static string KeyClickSoundFile
    {
    get { return keyClickSoundFile; }
    set { keyClickSoundFile = value; }
    }
They are useful when you want a property, but don't have to do anything extra with the information yet.

aeman wrote:
is static class is essential for this?


Not essential - there are other ways - but it is the way I would go.

aeman wrote:
where to create a static class? in form 1or in form2?


Neither! Always try to keep things self contained. If you make it part of Form1 then it implies that only Form1 should use it.
Set up a new class for such common - in the sense of used by many things - and put it in there. (Right click your project name in the Solution Explorer, and select "Add...Class". Give it a sensible name (Mine was "MakeNoisesAndGeneralyBeAnnoying" and click OK. Change it to be a static class in the .CS file, and off you go!)
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

GeneralRe: sound on btn clik Pin
aeman11-Feb-11 5:53
aeman11-Feb-11 5:53 
AnswerRe: sound on btn clik Pin
OriginalGriff11-Feb-11 8:50
mveOriginalGriff11-Feb-11 8:50 
GeneralRe: sound on btn clik Pin
aeman11-Feb-11 21:26
aeman11-Feb-11 21:26 
GeneralRe: sound on btn clik Pin
OriginalGriff11-Feb-11 21:31
mveOriginalGriff11-Feb-11 21:31 
GeneralRe: sound on btn clik Pin
aeman11-Feb-11 22:15
aeman11-Feb-11 22:15 
GeneralRe: sound on btn clik Pin
OriginalGriff11-Feb-11 22:21
mveOriginalGriff11-Feb-11 22:21 
GeneralRe: sound on btn clik Pin
aeman12-Feb-11 5:25
aeman12-Feb-11 5:25 
AnswerRe: sound on btn clik Pin
musefan11-Feb-11 2:47
musefan11-Feb-11 2:47 
AnswerRe: sound on btn clik Pin
DaveyM6911-Feb-11 3:17
professionalDaveyM6911-Feb-11 3:17 
QuestionRTP to streaming webcam P2P or to a webpage [modified] Pin
Honik8911-Feb-11 2:16
Honik8911-Feb-11 2:16 
AnswerRe: RTP to streaming webcam P2P or to a webpage Pin
Ali Al Omairi(Abu AlHassan)11-Feb-11 15:16
professionalAli Al Omairi(Abu AlHassan)11-Feb-11 15:16 
GeneralRe: RTP to streaming webcam P2P or to a webpage Pin
Honik8911-Feb-11 22:13
Honik8911-Feb-11 22:13 
AnswerRe: RTP to streaming webcam P2P or to a webpage Pin
Henry Minute12-Feb-11 3:18
Henry Minute12-Feb-11 3:18 
QuestionIntearact with DB ? Pin
Hum Dum10-Feb-11 22:21
Hum Dum10-Feb-11 22:21 
AnswerRe: Intearact with DB ? Pin
Pete O'Hanlon10-Feb-11 23:27
mvePete O'Hanlon10-Feb-11 23:27 
GeneralRe: Intearact with DB ? Pin
Hum Dum10-Feb-11 23:52
Hum Dum10-Feb-11 23:52 
GeneralRe: Intearact with DB ? Pin
PIEBALDconsult11-Feb-11 0:15
mvePIEBALDconsult11-Feb-11 0:15 

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.