Click here to Skip to main content
15,893,722 members
Home / Discussions / C#
   

C#

 
QuestionVS2010 solution file cleaning Pin
PozzaVecia22-Sep-12 22:59
PozzaVecia22-Sep-12 22:59 
AnswerRe: VS2010 solution file cleaning Pin
Wes Aday22-Sep-12 23:45
professionalWes Aday22-Sep-12 23:45 
QuestionGetting Data from Methods of Type Void Pin
ASPnoob22-Sep-12 20:01
ASPnoob22-Sep-12 20:01 
AnswerRe: Getting Data from Methods of Type Void Pin
Pete O'Hanlon22-Sep-12 21:21
mvePete O'Hanlon22-Sep-12 21:21 
AnswerRe: Getting Data from Methods of Type Void Pin
Dave Kreskowiak23-Sep-12 4:30
mveDave Kreskowiak23-Sep-12 4:30 
QuestionGetting Data from methods of Type Void Pin
ASPnoob22-Sep-12 20:00
ASPnoob22-Sep-12 20:00 
QuestionC# pass variable to console application Pin
classy_dog22-Sep-12 10:48
classy_dog22-Sep-12 10:48 
AnswerRe: C# pass variable to console application Pin
Wes Aday22-Sep-12 12:42
professionalWes Aday22-Sep-12 12:42 
QuestionHow to Use Array As Value Type Pin
mohammadkaab22-Sep-12 9:11
mohammadkaab22-Sep-12 9:11 
AnswerRe: How to Use Array As Value Type Pin
Dave Kreskowiak22-Sep-12 9:19
mveDave Kreskowiak22-Sep-12 9:19 
GeneralRe: How to Use Array As Value Type Pin
mohammadkaab22-Sep-12 10:24
mohammadkaab22-Sep-12 10:24 
GeneralRe: How to Use Array As Value Type Pin
Wes Aday22-Sep-12 10:42
professionalWes Aday22-Sep-12 10:42 
GeneralRe: How to Use Array As Value Type PinPopular
Dave Kreskowiak22-Sep-12 13:15
mveDave Kreskowiak22-Sep-12 13:15 
QuestionCreate Instance or invoke members of a class from a loaded assembly Pin
Danzy8322-Sep-12 1:57
Danzy8322-Sep-12 1:57 
AnswerRe: Create Instance or invoke members of a class from a loaded assembly Pin
Eddy Vluggen22-Sep-12 2:54
professionalEddy Vluggen22-Sep-12 2:54 
GeneralRe: Create Instance or invoke members of a class from a loaded assembly Pin
Danzy8322-Sep-12 4:18
Danzy8322-Sep-12 4:18 
GeneralRe: Create Instance or invoke members of a class from a loaded assembly Pin
Eddy Vluggen22-Sep-12 5:01
professionalEddy Vluggen22-Sep-12 5:01 
AnswerRe: Create Instance or invoke members of a class from a loaded assembly Pin
jschell22-Sep-12 8:44
jschell22-Sep-12 8:44 
AnswerRe: Create Instance or invoke members of a class from a loaded assembly Pin
BobJanova24-Sep-12 0:52
BobJanova24-Sep-12 0:52 
QuestionC# Application With MS Access Pin
SUBODH.SB21-Sep-12 23:39
SUBODH.SB21-Sep-12 23:39 
AnswerRe: C# Application With MS Access Pin
Eddy Vluggen22-Sep-12 2:56
professionalEddy Vluggen22-Sep-12 2:56 
AnswerRe: C# Application With MS Access Pin
Smart Arab23-Sep-12 10:39
Smart Arab23-Sep-12 10:39 
QuestionC# linq problem Pin
classy_dog21-Sep-12 11:38
classy_dog21-Sep-12 11:38 
I am working in a C# 2010 application where I have written the following lines of linq to sql code:
int TotCount = 0;            
string[] PkgIDs = rptData.Transaction.Where(c =>c.Package_ID.StartsWith("rva") &&
                                c.Received_Date != null ).Select(c => c.Package_ID).ToArray();
            foreach (string PkgID in PkgIDs)
            {
                var eCnt =  rptData.Details.Where(c =>c.Package_ID == PkgID).Select(c =>c.TotalTrans);
                TotCount = Convert.ToInt32(eCnt);
            }


My problem line of code is:    var eCnt =  rptData.Details.Where(c =>c.Package_ID == PkgID).Select(c =>c.TotalTrans);

I want to be able to obtain the value contained in the c.TotalTrans field and place the value in the eCnt field.

When I am stepping through the code and go to the line right after the line I listed above, I only see the sql equivalent value. I want to see the value for c.TotalTrans in the eCnt field.

I know what I need now is to actually make the linq to sql statement actually execute. That would be similar to the 'ToArray()'
statement listed above. However, I do not know what to change in the statement to actually obtain the value.

Thus can you tell me what else I need to add to this statement so that I get my desired
AnswerRe: C# linq problem Pin
Matt T Heffron21-Sep-12 13:18
professionalMatt T Heffron21-Sep-12 13:18 
Questionputting VS projects/solutions in a TFS team project Pin
chuckdawit21-Sep-12 7:58
chuckdawit21-Sep-12 7:58 

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.