Thread: monthCalendar question

  1. #1
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853

    monthCalendar question

    If I do this:
    Code:
    monthCalendar1.AnnuallyBoldedDates = new DateTime[1];
    monthCalendar1.AnnuallyBoldedDates[0] = new DateTime(2008, 10, 10, 0, 0, 0, 0);
    it doesn't work. Meaning it is compiled but it doesn't make the date bold.
    But this works normally:
    Code:
    monthCalendar1.AnnuallyBoldedDates = new DateTime[]
     {new DateTime(2008, 10, 10, 0, 0, 0, 0)};
    What is the difference? Am I missing something here?

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Depends on AnnuallyBoldedDates. It may use some internal caching, not just storing/returning the array pointer. It could also apply the bold format directly in AnnuallyBoldedDates.set() so when you change the array element it won't have any effect (it's too late).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Hmm. Is ther another way to do this?

    EDIT: Ok found a way. An obvious one. Just make a temporary object and the assign it to monthCalendar1.AnnuallyBoldedDates
    Last edited by C_ntua; 10-12-2008 at 08:09 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM