Click here to Skip to main content
12,350,610 members (25,972 online)

Visual Basic

 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen16-Oct-12 2:42
memberEddy Vluggen16-Oct-12 2:42 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah16-Oct-12 2:59
memberzaimah16-Oct-12 2:59 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen16-Oct-12 3:17
memberEddy Vluggen16-Oct-12 3:17 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah16-Oct-12 3:50
memberzaimah16-Oct-12 3:50 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen16-Oct-12 4:21
memberEddy Vluggen16-Oct-12 4:21 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah17-Oct-12 4:13
memberzaimah17-Oct-12 4:13 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen17-Oct-12 4:51
memberEddy Vluggen17-Oct-12 4:51 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah17-Oct-12 5:25
memberzaimah17-Oct-12 5:25 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah17-Oct-12 6:04
memberzaimah17-Oct-12 6:04 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen17-Oct-12 9:20
memberEddy Vluggen17-Oct-12 9:20 
AnswerRe: [SOLVED] How to update Gridview with value textbox = Null Pin
josephSurgeon31-Oct-12 4:27
memberjosephSurgeon31-Oct-12 4:27 
QuestionIndex was outside the bounds of the array Pin
etteychan12-Oct-12 19:03
memberetteychan12-Oct-12 19:03 
AnswerRe: Index was outside the bounds of the array Pin
Richard MacCutchan12-Oct-12 21:07
mvpRichard MacCutchan12-Oct-12 21:07 
QuestionConfused by my own code: LINQ FirstOrDefault Pin
Steven St. John11-Oct-12 13:18
memberSteven St. John11-Oct-12 13:18 
I'm a hobbyist programmer, and sometimes I go many months without programming. I have recently come back to a project I started months ago, and I am confused by my own (working) code.

Here's the code that is confusing me:

Dim groupToAdd As DavisGroup
groupToAdd = Aggregate g In groupList Into FirstOrDefault(g.Name = newGroupName)

The variable groupList is a ListOf(DavisGroup). The code is testing to see whether the list already contains an object with the Name (String property of DavisGroup) "newGroupName" as the names have to be unique. My code goes on to do something different depending on if groupToAdd is a returned object or is Nothing. What I don't get is what "Aggregate" is doing.

In trying to search for an answer, I rewrote the same code like this:

groupToAdd = groupList.FirstOrDefault(Function(g) g.Name = newGroupName)

As far as I can tell, this code works in exactly the same way.

My questions:

What is Aggregate doing in this particular snippet?
Are these two snippets equivalent?
If so, is there a reason to prefer one over the other?
AnswerRe: Confused by my own code: LINQ FirstOrDefault Pin
Steven St. John16-Oct-12 6:58
memberSteven St. John16-Oct-12 6:58 
QuestionVB.NET Parameters error Pin
Diego Carrion11-Oct-12 4:12
memberDiego Carrion11-Oct-12 4:12 
AnswerRe: VB.NET Parameters error Pin
Simon_Whale11-Oct-12 4:45
memberSimon_Whale11-Oct-12 4:45 
GeneralRe: VB.NET Parameters error Pin
Diego Carrion11-Oct-12 4:47
memberDiego Carrion11-Oct-12 4:47 
GeneralRe: VB.NET Parameters error Pin
ChandraRam11-Oct-12 11:06
memberChandraRam11-Oct-12 11:06 
QuestionSlow Ping and not guaranteed success Pin
Herboren10-Oct-12 5:44
memberHerboren10-Oct-12 5:44 
AnswerRe: Slow Ping and not guaranteed success Pin
Dave Kreskowiak10-Oct-12 8:13
mvpDave Kreskowiak10-Oct-12 8:13 
GeneralRe: Slow Ping and not guaranteed success Pin
Herboren10-Oct-12 11:33
memberHerboren10-Oct-12 11:33 
GeneralRe: Slow Ping and not guaranteed success Pin
Dave Kreskowiak10-Oct-12 13:01
mvpDave Kreskowiak10-Oct-12 13:01 
GeneralRe: Slow Ping and not guaranteed success Pin
Herboren10-Oct-12 16:20
memberHerboren10-Oct-12 16:20 
GeneralRe: Slow Ping and not guaranteed success Pin
Dave Kreskowiak10-Oct-12 23:50
mvpDave Kreskowiak10-Oct-12 23:50 
GeneralRe: Slow Ping and not guaranteed success Pin
Eddy Vluggen15-Oct-12 1:19
memberEddy Vluggen15-Oct-12 1:19 
QuestionFunction Not Found From Dll Component Pin
AmbiguousName10-Oct-12 1:57
memberAmbiguousName10-Oct-12 1:57 
AnswerRe: Function Not Found From Dll Component Pin
Eddy Vluggen11-Oct-12 0:08
memberEddy Vluggen11-Oct-12 0:08 
GeneralRe: Function Not Found From Dll Component Pin
AmbiguousName12-Oct-12 1:07
memberAmbiguousName12-Oct-12 1:07 
GeneralRe: Function Not Found From Dll Component Pin
Eddy Vluggen12-Oct-12 1:25
memberEddy Vluggen12-Oct-12 1:25 
GeneralRe: Function Not Found From Dll Component Pin
AmbiguousName12-Oct-12 1:54
memberAmbiguousName12-Oct-12 1:54 
GeneralRe: Function Not Found From Dll Component Pin
Eddy Vluggen12-Oct-12 2:10
memberEddy Vluggen12-Oct-12 2:10 
QuestionBlank Asp webpage. Pin
Member 94936398-Oct-12 0:08
memberMember 94936398-Oct-12 0:08 
AnswerRe: Blank Asp webpage. Pin
Cloud Cray8-Oct-12 7:49
memberCloud Cray8-Oct-12 7:49 
GeneralRe: Blank Asp webpage. Pin
miss7869-Oct-12 1:14
membermiss7869-Oct-12 1:14 
GeneralRe: Blank Asp webpage. Pin
Dave Kreskowiak9-Oct-12 1:51
mvpDave Kreskowiak9-Oct-12 1:51 
GeneralRe: Blank Asp webpage. Pin
Dave Kreskowiak9-Oct-12 1:55
mvpDave Kreskowiak9-Oct-12 1:55 
GeneralRe: Blank Asp webpage. Pin
miss7869-Oct-12 3:54
membermiss7869-Oct-12 3:54 
QuestionQuestion about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 5:32
memberDiego Carrion7-Oct-12 5:32 
AnswerRe: Question about variables in Classic ASP VBScript Pin
Zac Greve7-Oct-12 6:10
memberZac Greve7-Oct-12 6:10 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 6:19
memberDiego Carrion7-Oct-12 6:19 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Wes Aday7-Oct-12 6:38
memberWes Aday7-Oct-12 6:38 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 7:02
memberDiego Carrion7-Oct-12 7:02 
GeneralRe: Question about variables in Classic ASP VBScript Pin
ChandraRam7-Oct-12 20:55
memberChandraRam7-Oct-12 20:55 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion8-Oct-12 2:20
memberDiego Carrion8-Oct-12 2:20 
GeneralRe: Question about variables in Classic ASP VBScript Pin
ChandraRam8-Oct-12 2:23
memberChandraRam8-Oct-12 2:23 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion8-Oct-12 2:26
memberDiego Carrion8-Oct-12 2:26 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Zac Greve7-Oct-12 6:39
memberZac Greve7-Oct-12 6:39 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Dave Kreskowiak7-Oct-12 8:15
mvpDave Kreskowiak7-Oct-12 8:15 
GeneralRe: Question about variables in Classic ASP VBScript Pin
Diego Carrion7-Oct-12 9:25
memberDiego Carrion7-Oct-12 9:25 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 26 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid