Click here to Skip to main content
16,008,183 members
Home / Discussions / C#
   

C#

 
QuestionUsing LDAP for user authentication Pin
mav.northwind22-Jan-07 6:35
mav.northwind22-Jan-07 6:35 
QuestionData Grid View Setting Current Row Pin
Jawa200622-Jan-07 6:31
Jawa200622-Jan-07 6:31 
AnswerRe: Data Grid View Setting Current Row Pin
Marc Clifton22-Jan-07 6:42
mvaMarc Clifton22-Jan-07 6:42 
Questionc# Pin
Member 321217722-Jan-07 6:13
Member 321217722-Jan-07 6:13 
AnswerRe: c# Pin
GaryWoodfine 23-Jan-07 6:48
professionalGaryWoodfine 23-Jan-07 6:48 
Questionc# Pin
Member 321217722-Jan-07 6:12
Member 321217722-Jan-07 6:12 
QuestionFind active user under Fast User Switching Pin
Dave Midgley22-Jan-07 5:14
Dave Midgley22-Jan-07 5:14 
QuestionWhat the heck... Pin
Ray Cassick22-Jan-07 5:01
Ray Cassick22-Jan-07 5:01 
Ok, I have to admit that I am more of a VBer (no flames PLEASE) than a C#er here but I am trying to work through something that just does not seem to make sense and am looking for some help. I am trying to convert a OS project called NClass over form C# to VB, mostly just as an exercise in reading C#, learning the REAL differences between the two as well as to end up with a component that I can use latter on.

I have run across the following lines of C# code that, although I can convert it to VB no problem, makes little sense to me and in fact throws an error.

shapes[i].Draw(g, shapes[i].Location - (Size) area.Location + marginSize);

Does C# allow you to cast a Point type to a Size type?

I THINK I get the idea about what they are trying to do here (draw a shape on an image based upon its location in relation to the location of the shape on the drawing area plus adding a bit for a margin) but it simply makes no sense to me that you would be allowed to do this in this manner.

Can anyone enlighten me?

Seems to me this falls into the category of one of those things that C# lets you get away with but is not all that proper.



AnswerRe: What the heck... Pin
Marc Clifton22-Jan-07 5:11
mvaMarc Clifton22-Jan-07 5:11 
AnswerRe: What the heck... Pin
tgrt22-Jan-07 5:22
tgrt22-Jan-07 5:22 
GeneralRe: What the heck... Pin
Ray Cassick22-Jan-07 5:26
Ray Cassick22-Jan-07 5:26 
QuestionMerging image segments into one image Pin
MayyMagdy22-Jan-07 4:48
MayyMagdy22-Jan-07 4:48 
AnswerRe: Merging image segments into one image Pin
Luc Pattyn22-Jan-07 6:09
sitebuilderLuc Pattyn22-Jan-07 6:09 
GeneralRe: Merging image segments into one image Pin
Rick van Woudenberg22-Jan-07 8:24
Rick van Woudenberg22-Jan-07 8:24 
GeneralRe: Merging image segments into one image Pin
Luc Pattyn22-Jan-07 8:59
sitebuilderLuc Pattyn22-Jan-07 8:59 
QuestionSitemap and role based access (custom roles) Pin
harinath22-Jan-07 4:40
professionalharinath22-Jan-07 4:40 
QuestionCompiling C# to win32 Pin
Mohamed El Gohary22-Jan-07 4:21
Mohamed El Gohary22-Jan-07 4:21 
AnswerRe: Compiling C# to win32 Pin
Obaid ur Rehman22-Jan-07 4:48
Obaid ur Rehman22-Jan-07 4:48 
Questioncreating labels Pin
boss-tech22-Jan-07 2:23
boss-tech22-Jan-07 2:23 
AnswerRe: creating labels Pin
Alaric_22-Jan-07 2:40
professionalAlaric_22-Jan-07 2:40 
GeneralRe: creating labels Pin
boss-tech22-Jan-07 2:55
boss-tech22-Jan-07 2:55 
GeneralRe: creating labels [modified] Pin
Martin#22-Jan-07 3:48
Martin#22-Jan-07 3:48 
AnswerRe: creating labels Pin
Alaric_22-Jan-07 4:01
professionalAlaric_22-Jan-07 4:01 
GeneralRe: creating labels [modified] Pin
boss-tech23-Jan-07 7:35
boss-tech23-Jan-07 7:35 
AnswerRe: creating labels Pin
David Domingues22-Jan-07 4:10
David Domingues22-Jan-07 4:10 

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.