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

C#

 
GeneralRe: just cant get this code to produce correct value Pin
Richard MacCutchan17-Sep-10 6:04
mveRichard MacCutchan17-Sep-10 6:04 
GeneralRe: just cant get this code to produce correct value Pin
AspDotNetDev16-Sep-10 12:04
protectorAspDotNetDev16-Sep-10 12:04 
AnswerRe: just cant get this code to produce correct value Pin
AspDotNetDev16-Sep-10 12:47
protectorAspDotNetDev16-Sep-10 12:47 
QuestionDatetimepicker: manual input Pin
mSh198516-Sep-10 3:36
mSh198516-Sep-10 3:36 
AnswerRe: Datetimepicker: manual input Pin
Łukasz Nowakowski16-Sep-10 4:02
Łukasz Nowakowski16-Sep-10 4:02 
AnswerRe: Datetimepicker: manual input Pin
Mycroft Holmes16-Sep-10 16:04
professionalMycroft Holmes16-Sep-10 16:04 
GeneralRe: Datetimepicker: manual input Pin
mSh198516-Sep-10 20:17
mSh198516-Sep-10 20:17 
AnswerRe: Datetimepicker: manual input Pin
V.16-Sep-10 20:09
professionalV.16-Sep-10 20:09 
GeneralRe: Datetimepicker: manual input Pin
mSh198516-Sep-10 20:18
mSh198516-Sep-10 20:18 
Questionhow to convert a column in gridview to combobox after binding?? Pin
leeoze16-Sep-10 3:26
leeoze16-Sep-10 3:26 
Answerfound the answer :) Pin
leeoze16-Sep-10 3:43
leeoze16-Sep-10 3:43 
QuestionDatagridview returns wrong rownumber Pin
RobScripta16-Sep-10 3:09
professionalRobScripta16-Sep-10 3:09 
AnswerRe: Datagridview returns wrong rownumber Pin
PIEBALDconsult16-Sep-10 3:15
mvePIEBALDconsult16-Sep-10 3:15 
GeneralRe: Datagridview returns wrong rownumber Pin
RobScripta16-Sep-10 3:23
professionalRobScripta16-Sep-10 3:23 
AnswerRe: Datagridview returns wrong rownumber Pin
RobScripta16-Sep-10 4:10
professionalRobScripta16-Sep-10 4:10 
AnswerProblem solved Pin
RobScripta16-Sep-10 4:29
professionalRobScripta16-Sep-10 4:29 
QuestionC# Pin
arindam201016-Sep-10 1:23
arindam201016-Sep-10 1:23 
AnswerRe: C# Pin
OriginalGriff16-Sep-10 1:54
mveOriginalGriff16-Sep-10 1:54 
No. It won't compile - it will complain that you cannot implicitly cast a Class A to Class B (you can explicitly, but that won't execute either.)

Think about it: if you create an instance of A and try to use it as a B what happens? Any additional elements in B do not exist in your instance of A. For example, if B has a public string called "Text" that is not in A, what happens in your code if you say
static void Main(string[] args)
   {
   B obj1 = new A();
   Message.Show(obj1.Text);
   }
Where is the Text to come form - it hasn't been allocated in A!
It's like buying a loaf of bread and trying to treat it as a banana!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

GeneralMessage Removed Pin
16-Sep-10 2:08
arindam201016-Sep-10 2:08 
GeneralRe: C# Pin
Not Active16-Sep-10 2:17
mentorNot Active16-Sep-10 2:17 
AnswerInterview question Pin
Not Active16-Sep-10 2:16
mentorNot Active16-Sep-10 2:16 
GeneralRe: Interview question Pin
Luc Pattyn16-Sep-10 2:25
sitebuilderLuc Pattyn16-Sep-10 2:25 
GeneralRe: Interview question Pin
Not Active16-Sep-10 2:59
mentorNot Active16-Sep-10 2:59 
AnswerRe: C# [modified] Pin
OriginalGriff16-Sep-10 5:19
mveOriginalGriff16-Sep-10 5:19 
GeneralRe: C# Pin
Chris Trelawny-Ross16-Sep-10 8:42
Chris Trelawny-Ross16-Sep-10 8:42 

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.