views:

233

answers:

4

Silverlight 2.0 has been out for a little while now. What are the concepts that you often see used incorrectly or think are misunderstood?

+2  A: 

I think its early days yet to have established a large enough set of instances of "usage" to determine those concepts which can be said to be "often" misunderstood.

AnthonyWJones
A: 

Personally, I don't understand the use of var keyword, or why should we use it instead of the real type identifier.

Example:

var t = new TextBox();

instead of

TextBox t = new TextBox();
tucod
Those both compile to the same thing. It tells the compiler to resolve the type at compile time. It is also required for anonymous types since they do not have a static type until compile time. I personally avoid it outside of simple uses (such as your example).
Richard Szalay
This is just a new feature of C# 3.0 rather than silverlight, you don't have to use it, it's intention is to reduce the code to a more readable size for complex types
mattmanser
This was implemented as a foundation feature of LINQ, but you do not have to use it.
pearcewg
Use it for when there IS NO 'real type identifier' - as with the results from a LINQ expression that returns a result set that is a composition of values from a number of sources. An anonymous type will be inferred and returned and var allows a type to be declared to receive it.
Gordon Mackie JoanMiro
A: 

I'd use the var keyword only for LINQ queries. The type returned can vary, hence the use of type var.

This is not an answer, it looks more like a comment on a previous answer, by tucod.
unwind
+1  A: 

I think it is data binding to controls. I find difficult to understand.

[edit] I'm web developer, I have developed many web application. Data binding is very straight forward in asp.net. In Silverlight data binding is quite complected. Web services used for data binding are in other project than Silverlight project, it create many problems during development Another thing I don't like abt Silverlight is that we have to create a seperate project for silverlight control. I want to create Silverlight page/control just like creating another web control.

Sharique
This is not an answer, it looks more like a comment on a previous answer, by tucod.
unwind
This is a relevant answer. He is saying that binding is an example of an often misunderstood feature. The proof being that he himself finds it difficult to understand.
Richard Szalay