Passing Lists From WCF To WCF In VB?

May 13, 2011

I'm trying to populate one list from another. I would think this code should work, but at the end of the day I get a list of identical items.

Public Sub WriteDatFile(ByRef lstReasons As System.Collections.Generic.List(Of LetterReason))
Dim tmplstReason As New TCPService.LetterReason

[Code]....

View 2 Replies


ADVERTISEMENT

Make Passing Generic Lists

May 6, 2009

I have a utility class that takes a generic list as a parameter.Code looks like:

Function DoStuff(collection as Object, elt as Object)
...
collection.Add(elt)

[code]....

View 3 Replies

Sorting 2 Lists Based On Only One Of The Lists?

Apr 1, 2011

I have two lists. One list is a list of names, the other list is a list of how many times each name is found in the first list noted in the database

so...
Nick
John
Jim
Jack

is the firs tlist

10
13
13
2

is the second list. Nick had 10, john 13 and so on.I want to sort the second list from large to small, but have the index for the first list still linked to the correct amount of calls.i do it this way so I can

for x = 0 to num_of_names
string = lst_name(x) & "-" & lst_count(x)
next x

View 3 Replies

Know If An Array Of Lists Contains Similar Items (similar Lists)?

May 20, 2010

I know how to check whether an item exists in a list using (MyList.Contains), But I do not know how to check the whole list. For example (use one button and one richtextbox):

[Code]...

View 14 Replies

For Each Loop - Two Lists?

Jul 24, 2010

I would like to loop through two lists using a For each loop.
dim data as list(of pointpairlist)
For each recLine in records
For Each chan In recLine.channels and d in data
d.add( func(chan) )
Next
next

Note: each record line has one sample from each channel recorded. i.e. each record line is a slice of a 32 sensor recordings. I want to build up a x,y list of data points for each channel (the x axis is common to all channels). Is there some way to do it similar to what I have above (avoiding indexing variables).

View 2 Replies

VB Lists And Calculations?

Jun 6, 2011

I'm very new to programing and am having problems trying to perform some calculations with a list. I have read in an array into a list with a count attached to each item example: "xxxxxx(intcount)". What I'm trying to do it use two xxxxxx(intcount)'s at xxxxxx(intcount+5) and xxxxxx(intcount+25) and use these two variables to calculate yyyyyy(intcount) but it isn't working. I understand this may be a stupid question but could someone please point me in the right direction.

View 6 Replies

Display The Lists Of Costs ?

Mar 20, 2011

Ok this is a hw assignment like always....just not sure on how to do the math on this form...the constants are declared for the registration fees and i did the same for the required days at each work shop i just need to find a way to multiply the days required at each workshop by the lodging fees. but i also need to display the lists of costs so its pretty complicated.

View 6 Replies

.net - Compare Different Generic Lists?

Mar 2, 2011

I have a method where I'm taking a generic object and using TypeOf to check what has been passed through. Now I would like to pass it a List(Of T) (T being anything) and no matter what T is I'd like to do the same thing to this list. I tried the following:

public sub foo(ByVal obj As Object)
if TypeOf obj Is List(Of Object) Then
'do stuff
end if
end sub

but this doesn't seem to work if I pass it List(Of String), say. I suppose that List(Of Object) and List(Of String) are being treated as different objects, but I thought that since String is an object, the comparision might work.

Now I realise that this is as ugly as sin and I'm better off overloading the method to take List(Of T) as its parameter, but I'm mostly asking out of curiosity: is there a way of comparing the types List(Of Object1) and List(Of Object2) and getting a positive result, since they are both just List(Of T)?

View 3 Replies

Compare Differences Between Lists?

Feb 17, 2011

Compare differences between lists?I have two sets of lists below[code]...

View 1 Replies

Comparing 2 Lists Name And Price?

Dec 17, 2009

I'm creating <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-

[code].....

View 2 Replies

FluentValidation With Lists Of Objects?

May 31, 2012

Right now I have a viewmodel that contains three lists of inputs; textboxinput, dropdownlistinput, and checkboxinput. Each of these lists is a list of input objects, which contain four values; paramenums, paramname, paramtype, and value. I am using these input lists to generate a variable number of fields on a form dependent on how many objects each list contains.

My current problem is that I'm not sure how to validate the variables in the list objects with fluent validation. I know how the behavior of each list should behave with regards to returning Nothing, but I don't know how to code that behavior with FluentValidation.

[Code]...

The thing I want to currently do is confirm that in every object in each of my lists, they all have a value attribute that isn't nothing. Can I do this by validating the input model? Right now, the code works at confirming that the list itself isn't null, but the objects in the list can still contain all null values. Is there a trivial way to do this? Alternatively, should I have set my code up differently?

View 1 Replies

Grab, And Lists All Into A Listbox?

Aug 27, 2011

<a href="http://www.websitename.com/Name" data-hovercard="/ajax/hovercard/user.php?id=100054545">Name</a>

how to grab, and lists all into a listbox?

View 1 Replies

How To Loop Through Two Lists Simultaneously

Apr 12, 2011

I have referred to the following question at: Using foreach loop to iterate through two lists. My question is this, with regards to the chosen answer: Can the o.DoSomething be a comparison? As in:

For Each a in ListA.Concat(ListB)
If(a from ListA=a from ListB) Then
Do Something here
End If
Next

I'm using VB.Net and would like to know how I can do what I have shown here. That would basically be to iterate through a joined list separately/independently.

View 4 Replies

Is Size Of Lists Cached In Some Way

Jan 17, 2010

Is the size of Lists cached in some way (calculated the first time you call it, and then retained untill some change is made to it), or does it get calculated every time you call the Count property? Same question for arrays.

View 11 Replies

Lists() And Data Structures

Sep 1, 2009

Can a list class in vb.net contain Data Structures ?

View 1 Replies

Merging 2 Lists In LINQ?

Jun 9, 2011

I have two Lists of custom objects:

List1: Year, Month, ValueA
List2: Year, Month, ValueB

I want to get a third List with a merge between the two:

List3: Year, Month, ValueA, ValueB

Is there any elegant way to perform that in LINQ VB.Net?

Example:

List1:
2010 - 6 - 2
2010 - 7 - 5

[Code].....

View 1 Replies

Moving Lines Between Lists?

May 16, 2011

how I would be able to move a line from one list box to another?

What I need to do is read a text file, populate the lines in list boxes (automatically sorting them by set groups, defined in the text file).

Then I want to move the names between the boxes to my desire, the hit save and it will write them all back into the same text file.

View 2 Replies

Populate Drop Down Lists?

Apr 5, 2011

I am fairly new to VB (have done some VB in excell, but its a bit different)

I have a couple of questions:

1) How do I populate a dropdown list from a Database Row 2?

2) When I create a Database from Acess, where do I save the database? and If I build the exe program later on, will it include the database, or how does it work? I feel completely stupid, but one of the best ways to learn is to try over and over again

View 2 Replies

Saving More Than One CheckListBox Lists?

Oct 23, 2011

I have 3 CheckListBoxes, and I want to save all of their "checked" states. I tried to change the code to save and load one to work for three, and this is what I came up with:

vb
Private Sub savechxlst()
Dim FileStream As New System.IO.FileStream("C:CheckedListBoxData.cld", IO.FileMode.Create)

[Code]....

Unfortunately, all this does is combine all of the checkboxes into one list (ChxLstSym), and leave the other lists (ChxLstAud and ChxLstEx) completely blank. By this I mean ChxLstSym ends up having 15 checkboxes instead of each of the 3 Lists having 5 checkboxes (Which is how it was before I saved and Loaded), though it does remember which boxes were checked originally.

Is there a way to fix this so that I can save and load the checked states for all three of the checklistboxes (ChxLstSym, ChxLstAud, and ChxLstEx) so that they are all in their own lists upon loading them?

View 5 Replies

Splitting Up And Merging Lists?

Sep 14, 2011

I have a program that takes some data from a Dictionary object, runs a batch process on it and then puts the output into a second Dictionary. The issue that I'm having is that the batch process can only handle 1000 records at a time and sometimes the list is larger than that. Right now, I'm looping through the Dictionary, taking records 1 to 1000 and putting them into a Dictionaryof the same type to process, running the batch, looping through the results to add them to the second Dictionaryand then starting the loops again at record 1001.

Is there a more efficient way to do this to pull out the first 1000 records into another Dictionaryand then batch insert the results into the output Dictionary? It seems like the kind of thing there'd be a function for, but I'm not sure how to do it.

View 1 Replies

Use Arrays Or Lists When Sorting?

Jun 24, 2011

I have been assigned a program for homework in which I need to take in information about songs from a text file and then be able to sort the list alphabetically, by genre and by length. I also need to be able to filter it by genre. The user can then move songs they choose from the master list to a playlist where again the list can be sorted by either genre or play order.My book only covered sorting array when they are one dimensional however I need to be able to sort a multidimensional array by different columns. I asked my teacher but she had so much going on that we didn't really have time to get into it, so I decided to ask here.

I'm not looking for code, just to get pointed in the right direction. For instance rather than using a multidimensional array would it be better to pull the values in and then put them into an array of song objects with properties for each value? And if I choose to go that route is an array the best structure to use? I have to use an array of some type, but the problem says nothing about whether or not it can be a list or other array type structure.

View 6 Replies

VS 2010 Lists Are Linked

Oct 19, 2011

I have the following function that combines objects based on their gameScore attribute [code]NOTE the function is in a different class than where I have the lists I'm giving it..I had to set all the game positions blank because it saw an object with the same ID but different position as a different object. I didn't realize that even though I passed in the list ByVal the code deletes the courses on the original list somehow.First I input the origonal list expecting it not to be altered and put the output as a new list.[code]Yet somehow even the last one deletes the gamePosition attribute on listGames BUT *Doesn't* do the sum funtion for them, why is this happening it doesn't make any sense, it shouldn't touch listGames

View 7 Replies

[2005] How To Compare Two Lists

Jan 22, 2009

Im trying to compare two lists,to find out how which items occur in both lists. I also want to test for duplication within a list.Now, the obvious way is a loop/compare which works fine for a low number of items. Beyond 10000 items, things slow down much more than a factor of 10.

Dim List1 As New List(Of String)
Dim List2 As New List(Of String)
Dim List3 As New List(Of String)

[code]....

View 3 Replies

.net - Reference Elements In Multiple Lists Together?

Apr 14, 2012

For my first post I've got a tricky question. I'm past walking through tutorials but not far enough to join the Open Source Community.this Question I'm trying to create a program that tracks combinations used in Alchemy Games (Generally on a mobile phone etc)I've got the following classes

Class Game contains properties for Elements and Combinations
Class Elements Inherits List(Of Element)
Class Combinations Inherits List(Of Combination)
Class Element
Class Combination

Combination contains Element 1 and Element 2 and List(Of Element) for the results My Question: Using Game.Elements how can I add a readonly property for combinations of that element.

[Code]...

View 1 Replies

.net 4.0 - Separate Lists From Same Class Copy Each-other?

Feb 7, 2012

Im trying to get a ComboBox that would list all the pc on a netowrk, (Domain and/or WorkGroup)the idea is so that when i start typing the name of the pc list would come up with sugestions (nearest match)

[code]....

View 2 Replies

Arrays - Compare Two Lists 2D And Determine

May 2, 2012

I declare my 2D lists:

Dim _invoiceitems As New List(Of List(Of String))
Dim _dbitems As New List(Of List(Of String))

Each List is filled like this: Example Code To fill:

_invoiceitems.Add(New List(Of String))
_invoiceitems(0).Add("Code #")
_invoiceitems(0).Add("Quantity")

Well, now i need a third list called (_changesitems) Note that this result with the differences: be the result of subtraction of quantities if this is found (dbitems - invoiceitems).

View 1 Replies

Arrays / Lists And Computing HashValues

Jun 13, 2010

I've had experience with using hashvalues from String objects. E.g., if I have StringA and StringB both equal to "foo", they'll both compute out the same hashvalue, because they're set to equal values. Now what if I have a List, with T being a native data type. If I tried to compute the hashvalue of ListA and ListB, assuming that they'd both be the same size and contain the same information, wouldn't they have equal hashvalues as well?

Assuming as sample dataset of 'byte' with a length of 5
{5,2,0,1,3}

View 3 Replies

Asp.net - .net Ashx Web Handler How To Return Lists?

Mar 2, 2012

I have a vb.net web handler which builds two strings The strings basically looks like this:

["filename", "filepath"],["filename", filepath"],...,["filename", filepath"]

I need to return it in a way that the strings are sent with the name of the list, followed by the list

["listname": {["filename", "filepath"],["filename", filepath"],...,["filename", filepath"]}

I know that the web handler will automatically json encode the data, and that the way I have built my list should be reworked (the way we previously used this it was exactly what we needed).What might be a better way for me to house my data and return it to the browser in a way that is understood correctly?

View 1 Replies

Asp.net - SQL String Adjustment For Drop Down Lists?

Oct 31, 2011

I'll try to clarify by using the following example. In here I have two Drop down lists (ddlInsertEmployee + ddlInsertCustomer) which should both be bound to fetch data from tables [Employee.EmployeeID] and [Customer.CustomerID] and insert it into table [Task].

The problem is that it inserts data from Employee.Fullname and Customer.Fullname into resp.Employee.EmployeeID and Customer. CustomerID.If I would change the Drop down lists to textboxes, and manually insert the IDs, it works like a charm, but this is not very efficient, I want to be able to see the entire Fullname.how to change my Sqlstring in order to make this work correctly.

Imports System
Imports System.Collections.Generic
Imports System.Data[code].......

View 1 Replies

C# - .NET Generics - Compare Two Lists And Filter?

Jun 19, 2011

I have two generic lists of type T. Both lists contain same type, and I'd like to create a third list (or a filtered version of list 2) based on the items in list two that do not exist in List 1, based on the ID of each item.Each list holds a "Package" object, which has an ID property.Right now I mocked up the code using For Each loops, which I know is horrible (the Big O is constant time) so I'd like a more efficent method. this code is in VB per project requirments, but I prefer C# - so either code sample would work for me.

Private Sub RemoveStockPackagesFromSelection()
Dim p As Package
Dim packageList As List(Of Package) = New List(Of Package)

[code]....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved