CodingC#- classes inside classes... or something

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Ally   
 To:  THERE IS NO GOD BUT (RENDLE)     
35454.10 In reply to 35454.9 
Definitely an interface. I mean, I copy and pasted it. Is there any reason I couldn't do this to get my result:

csharp code:
public class AffiliateFilters
        {
            AffiliateConstants _parent;
            public AffiliateFilters(AffiliateConstants parent)
            {
                _parent = parent;
            }
            public DateTime StartDate { get { return _parent.m_FilterStartDate; } }
            public DateTime EndDate { get { return _parent.m_FilterEndDate; } }
            public String MetroCode { get { return _parent.m_FilterMetroCode; } }
            public String ZipCode { get { return _parent.m_FilterZipCode; } }
        }
 
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Ally      
35454.11 In reply to 35454.10 

No, that'd be fine too.

 

Are you using some ancient version of C#? Maybe the compiler wasn't as clever before 3.0 or something.

0/0
 Reply   Quote More 

 From:  Ally   
 To:  THERE IS NO GOD BUT (RENDLE)     
35454.12 In reply to 35454.11 

I'm on Visual Studio 2008 but it's targetting 2.0, so that's possibly the case.

 

At least I'm not using 1.1 any more. Slow progress.

0/0
 Reply   Quote More 

Reply to All    
 

1–12

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats