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

C#

 
Questionmodify control properties in usercontrol Pin
Marc Soleda9-Jan-07 20:44
Marc Soleda9-Jan-07 20:44 
GeneralRe: modify control properties in usercontrol Pin
Martin#9-Jan-07 21:06
Martin#9-Jan-07 21:06 
GeneralRe: modify control properties in usercontrol Pin
Marc Soleda9-Jan-07 21:40
Marc Soleda9-Jan-07 21:40 
GeneralRe: modify control properties in usercontrol Pin
Luc Pattyn9-Jan-07 22:46
sitebuilderLuc Pattyn9-Jan-07 22:46 
Questionmarshalling mechanism Pin
s o v a n n9-Jan-07 20:31
s o v a n n9-Jan-07 20:31 
QuestionHow to give application upgrading by .net for the window application,which is done by visual c#? Pin
illusionarylife9-Jan-07 20:28
illusionarylife9-Jan-07 20:28 
AnswerRe: How to give application upgrading by .net for the window application,which is done by visual c#? Pin
Christian Graus9-Jan-07 20:41
protectorChristian Graus9-Jan-07 20:41 
QuestionProblem with assignment using properties... maybe because of IClonable interface Pin
fordge9-Jan-07 20:13
fordge9-Jan-07 20:13 
Consider the following code example
class Program
    {
        static void Main(string[] args)
        {
            StudentInfo stud = new StudentInfo();
            stud.Name.FirstName = "zai";                //fails assigns firstname as null
            stud.name.FirstName = "zai";                //works succesfully
        }
    }
    class NameInfo :ICloneable
    {
        private string firstname;

        public string FirstName
        {
            get { return firstname; }
            set { firstname = value; }
        }
        public object Clone()
        {
            NameInfo n = new NameInfo();
            n.LastName = this.lastname;
            return n;
        }
    }
    class StudentInfo:ICloneable
    {
        public NameInfo name = new NameInfo();
        public NameInfo Name
        {
            get
            {
                if (name != null)
                    return (NameInfo)name.Clone();
                else
                    return null;
            }
            set
            {
                if (value != null)
                    name = (NameInfo)value.Clone();
                else
                    name = null;
            }
        }
        public object Clone()
        {
            StudentInfo s = new StudentInfo();
            s.Name = this.Name;
            return s;
        }
    }
the following statement fails when accessing firstname thru Name property
stud.Name.FirstName = "zai";
while the one below is ok
stud.name.FirstName = "zai";

why??

if I was not using an IClonable interface both of them work....but im not sure its an IClonable issue...

is there any rule that says that we souldnt access inner variables through a property of that object?
AnswerRe: Problem with assignment using properties... maybe because of IClonable interface Pin
Stefan Troschuetz9-Jan-07 21:42
Stefan Troschuetz9-Jan-07 21:42 
QuestionHow to view SOAP request/response contents [modified] Pin
blackjack21509-Jan-07 19:41
blackjack21509-Jan-07 19:41 
QuestionHow to check form object created or not Windows App Pin
indiaone9-Jan-07 19:24
indiaone9-Jan-07 19:24 
AnswerRe: How to check form object created or not Windows App Pin
Christian Graus9-Jan-07 19:59
protectorChristian Graus9-Jan-07 19:59 
Questionform maxmizied Pin
md_refay9-Jan-07 19:22
md_refay9-Jan-07 19:22 
AnswerRe: form maxmizied Pin
Christian Graus9-Jan-07 19:59
protectorChristian Graus9-Jan-07 19:59 
GeneralRe: form maxmizied Pin
md_refay9-Jan-07 20:25
md_refay9-Jan-07 20:25 
Question.net remoting proxy Pin
s o v a n n9-Jan-07 18:03
s o v a n n9-Jan-07 18:03 
QuestionIs event handler bound to instance of object, and will it stick? Pin
JoeRip9-Jan-07 17:59
JoeRip9-Jan-07 17:59 
AnswerRe: Is event handler bound to instance of object, and will it stick? Pin
Scott Dorman9-Jan-07 18:36
professionalScott Dorman9-Jan-07 18:36 
GeneralRe: Is event handler bound to instance of object, and will it stick? Pin
JoeRip10-Jan-07 14:42
JoeRip10-Jan-07 14:42 
GeneralRe: Is event handler bound to instance of object, and will it stick? Pin
Scott Dorman10-Jan-07 15:18
professionalScott Dorman10-Jan-07 15:18 
QuestionHow to send password value securly Pin
mohd imran abdul aziz9-Jan-07 17:34
mohd imran abdul aziz9-Jan-07 17:34 
AnswerRe: How to send password value securly Pin
Not Active9-Jan-07 17:40
mentorNot Active9-Jan-07 17:40 
AnswerRe: How to send password value securly Pin
Russell Jones9-Jan-07 22:27
Russell Jones9-Jan-07 22:27 
QuestionError handling Pin
Harikrk9-Jan-07 15:43
Harikrk9-Jan-07 15:43 
AnswerRe: Error handling Pin
Paul Conrad9-Jan-07 16:03
professionalPaul Conrad9-Jan-07 16:03 

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.