Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converting string to byte Pin
GuyThiebaut12-Apr-08 11:42
professionalGuyThiebaut12-Apr-08 11:42 
GeneralRe: Converting string to byte Pin
Ed.Poore12-Apr-08 11:51
Ed.Poore12-Apr-08 11:51 
GeneralRe: Converting string to byte Pin
GuyThiebaut12-Apr-08 11:57
professionalGuyThiebaut12-Apr-08 11:57 
GeneralRe: Converting string to byte Pin
Ed.Poore12-Apr-08 12:10
Ed.Poore12-Apr-08 12:10 
GeneralRe: Converting string to byte Pin
GuyThiebaut12-Apr-08 12:14
professionalGuyThiebaut12-Apr-08 12:14 
GeneralRe: Converting string to byte Pin
Ed.Poore12-Apr-08 12:25
Ed.Poore12-Apr-08 12:25 
GeneralRe: Converting string to byte Pin
martin_hughes12-Apr-08 13:12
martin_hughes12-Apr-08 13:12 
GeneralRe: Converting string to byte Pin
Guffa12-Apr-08 13:32
Guffa12-Apr-08 13:32 
It's a new feature in C# version 3.

It's needed for when you are using anonymous types in LINQ.

It can also be used to make the code easier to read if the data type that you are declaring is obvious from the context, like:

var cmd = new System.Data.SqlClient.SqlCommand(query, connection);

instead of repeating the data type:

System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(query, connection);

However, Ed is using it everywhere, even when the data type is not obvious from the context, which instead makes the code harder to read.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Converting string to byte Pin
martin_hughes12-Apr-08 13:41
martin_hughes12-Apr-08 13:41 
GeneralRe: Converting string to byte Pin
Ed.Poore12-Apr-08 22:47
Ed.Poore12-Apr-08 22:47 
GeneralRe: Converting string to byte Pin
Guffa13-Apr-08 7:24
Guffa13-Apr-08 7:24 
GeneralRe: Converting string to byte Pin
Ed.Poore13-Apr-08 7:42
Ed.Poore13-Apr-08 7:42 
QuestionUpdating or refreshing DataGridView after database change... Pin
Niksa12-Apr-08 9:51
Niksa12-Apr-08 9:51 
GeneralRe: Updating or refreshing DataGridView after database change... Pin
Elina Blank16-Apr-08 7:11
sitebuilderElina Blank16-Apr-08 7:11 
QuestionC# - Changing the data in the database Pin
Alessandra7712-Apr-08 9:14
Alessandra7712-Apr-08 9:14 
GeneralRe: C# - Changing the data in the database Pin
Christian Graus12-Apr-08 14:13
protectorChristian Graus12-Apr-08 14:13 
GeneralRe: C# - Changing the data in the database Pin
Alessandra7712-Apr-08 23:25
Alessandra7712-Apr-08 23:25 
GeneralLabel / Form Resizing Pin
danielk_12-Apr-08 5:25
danielk_12-Apr-08 5:25 
GeneralRe: Label / Form Resizing Pin
Anthony Mushrow12-Apr-08 5:46
professionalAnthony Mushrow12-Apr-08 5:46 
GeneralRe: Label / Form Resizing Pin
Luc Pattyn12-Apr-08 7:23
sitebuilderLuc Pattyn12-Apr-08 7:23 
GeneralPreFilterProperties Pin
danielk_12-Apr-08 5:24
danielk_12-Apr-08 5:24 
QuestionProblems to get SelectedValue from binded ComboBox Pin
Stefan Kneitz12-Apr-08 5:06
Stefan Kneitz12-Apr-08 5:06 
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Anthony Mushrow12-Apr-08 5:17
professionalAnthony Mushrow12-Apr-08 5:17 
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Stefan Kneitz12-Apr-08 5:22
Stefan Kneitz12-Apr-08 5:22 
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Anthony Mushrow12-Apr-08 5:27
professionalAnthony Mushrow12-Apr-08 5:27 

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.