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

C#

 
GeneralRe: UnInstall Option Pin
Bassam Saoud28-Nov-06 3:28
Bassam Saoud28-Nov-06 3:28 
QuestionWorksheetFunction class failed. Pin
GnanaprakashJebaraj27-Nov-06 22:24
GnanaprakashJebaraj27-Nov-06 22:24 
AnswerRe: WorksheetFunction class failed. Pin
ednrgc28-Nov-06 3:10
ednrgc28-Nov-06 3:10 
QuestionUsing PictureBox on form - InvalidProgramException Pin
Dewald27-Nov-06 22:16
Dewald27-Nov-06 22:16 
QuestionMerging PrintDocument Objects Pin
kumar.bs27-Nov-06 21:02
kumar.bs27-Nov-06 21:02 
Questiontypes Pin
Vijay Joshi27-Nov-06 21:01
Vijay Joshi27-Nov-06 21:01 
AnswerRe: types Pin
Guffa27-Nov-06 21:39
Guffa27-Nov-06 21:39 
AnswerRe: types Pin
Eduard Keilholz27-Nov-06 21:41
Eduard Keilholz27-Nov-06 21:41 
I think types are powerfull. I can imagine you ask this question if you're used to writing PHP, i wrote PHP and Perl and asked the same question for myself years ago. At first i thought types were annoying having to cast types over and over again. I accepted the concept of types and neatly switched the 'Option Strict' option in my VB Developement environment on and learned how to deal with types. Now writing C# there's no way around them and I think that's a good thing!

For example let's use an integer, you want a user to enter an integer somewhere in your application. You place a textbox on your (web)form and wait for the user to confirm his input. Obviously you check the user's input for example using a regular expression, or you just try to parse the input to an integer using int.TryParse (one of the quickest methods). Once your test succeeds you can actually parse the string type to an integer (TryParse already does that for you) which fills your integer variable with a certain value. There's no way the integer's value changes without having a numeric value. In PHP you could give your variable the value of the user's input, but that doesn't guarantee that value is actually a numeric value (integer). Types DO guarantee the values of those types. Same for all diffrent kinds of types. There's no way a certain type bacomes a diffrent type without actually casting them to a diffrent type. This prevents loads of errors and a hell of a debug job once an error occures somewhere in your app.

.: I love it when a plan comes together :.
http://www.zonderpunt.nl

AnswerRe: types Pin
jdkulkarni27-Nov-06 21:50
jdkulkarni27-Nov-06 21:50 
AnswerRe: types Pin
Christian Graus27-Nov-06 23:50
protectorChristian Graus27-Nov-06 23:50 
AnswerRe: types Pin
CPallini28-Nov-06 0:03
mveCPallini28-Nov-06 0:03 
Questionhow to send escape sequence to printer Pin
metinergoktas27-Nov-06 20:43
metinergoktas27-Nov-06 20:43 
AnswerRe: how to send escape sequence to printer Pin
darkelv27-Nov-06 23:08
darkelv27-Nov-06 23:08 
GeneralRe: how to send escape sequence to printer Pin
metinergoktas28-Nov-06 0:01
metinergoktas28-Nov-06 0:01 
Questionfunction problem Pin
biaali27-Nov-06 20:27
biaali27-Nov-06 20:27 
QuestionHow to apply theme to a c# windows form???? Pin
Niiiissssshhhhhuuuuu27-Nov-06 20:08
Niiiissssshhhhhuuuuu27-Nov-06 20:08 
QuestionHow to apply theme to a c# window form ?? Pin
Niiiissssshhhhhuuuuu27-Nov-06 20:05
Niiiissssshhhhhuuuuu27-Nov-06 20:05 
AnswerRe: How to apply theme to a c# window form ?? Pin
AB777127-Nov-06 21:30
AB777127-Nov-06 21:30 
GeneralRe: How to apply theme to a c# window form ?? Pin
Niiiissssshhhhhuuuuu27-Nov-06 23:19
Niiiissssshhhhhuuuuu27-Nov-06 23:19 
GeneralRe: How to apply theme to a c# window form ?? Pin
AB777127-Nov-06 23:26
AB777127-Nov-06 23:26 
GeneralRe: How to apply theme to a c# window form ?? Pin
Niiiissssshhhhhuuuuu27-Nov-06 23:38
Niiiissssshhhhhuuuuu27-Nov-06 23:38 
AnswerRe: How to apply theme to a c# window form ?? Pin
Christian Graus27-Nov-06 23:51
protectorChristian Graus27-Nov-06 23:51 
GeneralRe: How to apply theme to a c# window form ?? Pin
Niiiissssshhhhhuuuuu28-Nov-06 2:05
Niiiissssshhhhhuuuuu28-Nov-06 2:05 
GeneralRe: How to apply theme to a c# window form ?? Pin
Christian Graus28-Nov-06 8:12
protectorChristian Graus28-Nov-06 8:12 
GeneralRe: How to apply theme to a c# window form ?? Pin
Paul Conrad28-Nov-06 12:04
professionalPaul Conrad28-Nov-06 12:04 

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.