Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading Excel (xls+Xlsx) without Excel Interop library or OleDB/Jet? Pin
PIEBALDconsult8-Feb-13 3:48
mvePIEBALDconsult8-Feb-13 3:48 
Questiondata source for a chart Pin
sina rafati nia6-Feb-13 21:26
sina rafati nia6-Feb-13 21:26 
AnswerRe: data source for a chart Pin
Abhinav S6-Feb-13 23:25
Abhinav S6-Feb-13 23:25 
QuestionXelement headers and schema definition help Pin
DJ 26-Feb-13 12:19
DJ 26-Feb-13 12:19 
AnswerRe: Xelement headers and schema definition help Pin
Jibesh6-Feb-13 12:34
professionalJibesh6-Feb-13 12:34 
AnswerRe: Xelement headers and schema definition help Pin
Richard Deeming7-Feb-13 1:33
mveRichard Deeming7-Feb-13 1:33 
QuestionHow to put videos, with alpha channel, on the image Pin
okutan16-Feb-13 7:02
okutan16-Feb-13 7:02 
QuestionCould not evaluate expression Pin
MichCl6-Feb-13 3:16
MichCl6-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):
C#
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:
C#
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 Pin
Pete O'Hanlon6-Feb-13 4:00
mvePete O'Hanlon6-Feb-13 4:00 
GeneralRe: Could not evaluate expression Pin
Dave Kreskowiak6-Feb-13 4:11
mveDave Kreskowiak6-Feb-13 4:11 
GeneralRe: Could not evaluate expression Pin
MichCl6-Feb-13 4:12
MichCl6-Feb-13 4:12 
GeneralRe: Could not evaluate expression Pin
Pete O'Hanlon6-Feb-13 4:18
mvePete O'Hanlon6-Feb-13 4:18 
GeneralRe: Could not evaluate expression Pin
MichCl6-Feb-13 4:41
MichCl6-Feb-13 4:41 
AnswerRe: Could not evaluate expression Pin
Dave Kreskowiak6-Feb-13 4:10
mveDave Kreskowiak6-Feb-13 4:10 
GeneralRe: Could not evaluate expression Pin
MichCl6-Feb-13 4:20
MichCl6-Feb-13 4:20 
GeneralRe: Could not evaluate expression Pin
Eddy Vluggen6-Feb-13 5:02
professionalEddy Vluggen6-Feb-13 5:02 
GeneralRe: Could not evaluate expression Pin
MichCl6-Feb-13 5:30
MichCl6-Feb-13 5:30 
GeneralRe: Could not evaluate expression Pin
Dave Kreskowiak6-Feb-13 5:40
mveDave Kreskowiak6-Feb-13 5:40 
GeneralRe: Could not evaluate expression Pin
MichCl6-Feb-13 7:30
MichCl6-Feb-13 7:30 
GeneralRe: Could not evaluate expression Pin
Pete O'Hanlon6-Feb-13 5:56
mvePete O'Hanlon6-Feb-13 5:56 
GeneralRe: Could not evaluate expression Pin
MichCl6-Feb-13 7:52
MichCl6-Feb-13 7:52 
GeneralRe: Could not evaluate expression Pin
Dave Kreskowiak6-Feb-13 12:49
mveDave Kreskowiak6-Feb-13 12:49 
GeneralRe: Could not evaluate expression Pin
MichCl7-Feb-13 2:34
MichCl7-Feb-13 2:34 
GeneralRe: Could not evaluate expression Pin
Pete O'Hanlon7-Feb-13 2:48
mvePete O'Hanlon7-Feb-13 2:48 
GeneralRe: Could not evaluate expression Pin
Dave Kreskowiak7-Feb-13 7:35
mveDave Kreskowiak7-Feb-13 7:35 

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.