Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: problem in while and for loops Pin
Dr.Sammer9-Feb-06 11:19
Dr.Sammer9-Feb-06 11:19 
GeneralRe: problem in while and for loops Pin
User 66589-Feb-06 11:22
User 66589-Feb-06 11:22 
GeneralRe: problem in while and for loops Pin
Dr.Sammer9-Feb-06 11:26
Dr.Sammer9-Feb-06 11:26 
GeneralRe: problem in while and for loops Pin
LongRange.Shooter10-Feb-06 2:14
LongRange.Shooter10-Feb-06 2:14 
QuestionArray declaration without specifying the size. Pin
emran8349-Feb-06 10:38
emran8349-Feb-06 10:38 
AnswerRe: Array declaration without specifying the size. Pin
Judah Gabriel Himango9-Feb-06 10:46
sponsorJudah Gabriel Himango9-Feb-06 10:46 
GeneralRe: Array declaration without specifying the size. Pin
emran8349-Feb-06 11:06
emran8349-Feb-06 11:06 
GeneralRe: Array declaration without specifying the size. Pin
Judah Gabriel Himango9-Feb-06 11:22
sponsorJudah Gabriel Himango9-Feb-06 11:22 
If it's scripting languages you're used to, many of them can be used and compiled to run on the .NET framework (making it instantly interoperable with C# components, VB.NET components, etc.) For example, Microsoft has available IronPython[^] which is Python running on the .NET framework. There is also Perl.NET[^], as well as some interesting new languages such as Nemerle[^] or Boo[^]. JScript.NET[^] is another script language by Microsoft, although it is compiled rather than interpreted.

In any case, the key in understanding scripting languages is that often times performance is sacrificed on the altar of programming ease. You can set a variable to an integer, then set it to a string no problem. That's dynamic/loose typing, which while it makes the life of the developer easier (less typing involved), it also can suffer from performance issues and type mismatch runtime errors (no type safety).

All that said, I would agree that it is too laborious to declare variable types in C#. I see that C# 3 is introducing some new syntax allowing for a more dynamic-like typing, but maintaining performance and type safety via the compiler inferring the type based on usage. For example, C# 3 will allow you to declare an array like this:

var myArray = new {1, 2, 3};

The compiler will infer you're doing an integer array, thus making it equivalent to the more laborious

int[] myArray = new int[] { 1, 2, 3 };

Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango


GeneralRe: Array declaration without specifying the size. Pin
emran8349-Feb-06 11:53
emran8349-Feb-06 11:53 
GeneralRe: Array declaration without specifying the size. Pin
Judah Gabriel Himango9-Feb-06 12:06
sponsorJudah Gabriel Himango9-Feb-06 12:06 
AnswerRe: Array declaration without specifying the size. Pin
Guffa9-Feb-06 22:16
Guffa9-Feb-06 22:16 
QuestionTriggerring Event Handler and pass variable in PARENT FORM from Child FORM Pin
emran8349-Feb-06 10:30
emran8349-Feb-06 10:30 
Question.NET Framework 2.0 Pin
Manu_819-Feb-06 10:21
Manu_819-Feb-06 10:21 
AnswerRe: .NET Framework 2.0 Pin
emran8349-Feb-06 10:33
emran8349-Feb-06 10:33 
AnswerRe: .NET Framework 2.0 Pin
Judah Gabriel Himango9-Feb-06 10:42
sponsorJudah Gabriel Himango9-Feb-06 10:42 
QuestionDesign time problems with custom TreeView and private node class Pin
Pedro S Ferreira9-Feb-06 10:18
Pedro S Ferreira9-Feb-06 10:18 
AnswerRe: Design time problems with custom TreeView and private node class Pin
leppie9-Feb-06 10:51
leppie9-Feb-06 10:51 
GeneralRe: Design time problems with custom TreeView and private node class Pin
Pedro S Ferreira9-Feb-06 11:01
Pedro S Ferreira9-Feb-06 11:01 
AnswerRe: Design time problems with custom TreeView and private node class Pin
Pedro S Ferreira10-Feb-06 5:49
Pedro S Ferreira10-Feb-06 5:49 
Questionmenubar on a customised windows' form Pin
dlinks9-Feb-06 8:39
dlinks9-Feb-06 8:39 
QuestionConverting String to Int Pin
zaboboa9-Feb-06 8:34
zaboboa9-Feb-06 8:34 
AnswerRe: Converting String to Int Pin
Andy Moore9-Feb-06 9:16
Andy Moore9-Feb-06 9:16 
GeneralRe: Converting String to Int Pin
zaboboa9-Feb-06 9:33
zaboboa9-Feb-06 9:33 
AnswerRe: Converting String to Int Pin
Judah Gabriel Himango9-Feb-06 9:23
sponsorJudah Gabriel Himango9-Feb-06 9:23 
AnswerRe: Converting String to Int Pin
Peter Vertes9-Feb-06 18:52
Peter Vertes9-Feb-06 18:52 

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.