Click here to Skip to main content
       

C#

 
GeneralRe: Reading Excel (xls+Xlsx) without Excel Interop library or OleDB/Jet? PinmemberPIEBALDconsult8-Feb-13 3:48 
Questiondata source for a chart Pinmembersina rafati nia6-Feb-13 21:26 
AnswerRe: data source for a chart PinmvpAbhinav S6-Feb-13 23:25 
QuestionXelement headers and schema definition help PinmemberDJ 26-Feb-13 12:19 
AnswerRe: Xelement headers and schema definition help Pinmemberjibesh6-Feb-13 12:34 
AnswerRe: Xelement headers and schema definition help PinmemberRichard Deeming7-Feb-13 1:33 
QuestionHow to put videos, with alpha channel, on the image Pinmemberokutan16-Feb-13 7:02 
QuestionCould not evaluate expression PinmemberMichCl6-Feb-13 3:16 
I've been looking at a problem for the last couple of days, that hopefully someone has an answer for. When I get my variable (cr) as shown below, I can't use the variable and then step into the next method call and code that once worked is now not working. When I look into the class definition inside cr, it says "could not evaluate expression" edfed for the variable inside the class (cr).
 
I've searched the internet and found a couple of sources that seem to be saying that I have something that's null, but I'm not seeing why edfed would be null here.
http://stackoverflow.com/questions/9558498/could-not-evaluate-expression-activator-createinstancet[^]
 

This is where I obtain my class definition of cr:
cr = factory.GetCR(type);
 
I can show you the factory GetCR method, but I don't think there's an issue there:
public iCR GetCR(CRType type)         
{
            iCR cr = null;
            switch (type)
            {
                case CRType.CR5:
                    cr = new CR5_new.CR5();
                    break;
             }
}
 
In my CR5 class, this is how I define edfed. (It's possible that I could do something more in a C# way here and less of a C++ way like I'm familiar with; feel free to make suggestions):
using Sec_;
 
namespace CR5_new
{
    public class CR5:iCR
    {
       Sec edfed = null;
 
       //constructor
        public CR5()
        {
            edfed = new Sec();
            System.Diagnostics.Debug.WriteLine("edfed definition: " + edfed); //this print statement doesn't show up. Not sure why
        }
...
 
I also tried defining edfed in CR5 as follows and get the same result:
using Sec_;
 
namespace CR5_new
{
    public class CR5:iCR
    {
       Sec edfed = new Sec(); //the difference

       //constructor
        public CR5()
        {
            System.Diagnostics.Debug.WriteLine("edfed definition: " + edfed); //this print statement doesn't show up. Not sure why
        }
...
 
I'm hoping someone has a good suggestion of what I could do to fix this. It's really stumping us. Thanks.
AnswerRe: Could not evaluate expression PinprotectorPete O'Hanlon6-Feb-13 4:00 
GeneralRe: Could not evaluate expression PinmvpDave Kreskowiak6-Feb-13 4:11 
GeneralRe: Could not evaluate expression PinmemberMichCl6-Feb-13 4:12 
GeneralRe: Could not evaluate expression PinprotectorPete O'Hanlon6-Feb-13 4:18 
GeneralRe: Could not evaluate expression PinmemberMichCl6-Feb-13 4:41 
AnswerRe: Could not evaluate expression PinmvpDave Kreskowiak6-Feb-13 4:10 
GeneralRe: Could not evaluate expression PinmemberMichCl6-Feb-13 4:20 
GeneralRe: Could not evaluate expression PinmvpEddy Vluggen6-Feb-13 5:02 
GeneralRe: Could not evaluate expression PinmemberMichCl6-Feb-13 5:30 
GeneralRe: Could not evaluate expression PinmvpDave Kreskowiak6-Feb-13 5:40 
GeneralRe: Could not evaluate expression PinmemberMichCl6-Feb-13 7:30 
GeneralRe: Could not evaluate expression PinprotectorPete O'Hanlon6-Feb-13 5:56 
GeneralRe: Could not evaluate expression PinmemberMichCl6-Feb-13 7:52 
GeneralRe: Could not evaluate expression PinmvpDave Kreskowiak6-Feb-13 12:49 
GeneralRe: Could not evaluate expression PinmemberMichCl7-Feb-13 2:34 
GeneralRe: Could not evaluate expression PinprotectorPete O'Hanlon7-Feb-13 2:48 
GeneralRe: Could not evaluate expression PinmvpDave Kreskowiak7-Feb-13 7:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 25 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid