Microsoft
Software
Hardware
Network
Question : Array Help
I have an array that gets populated from a datatable.
The problem I am facing, I need the array to have increments of 4.
If the datatable only has 2 records, I need to pad the array with 2 additional positions.
If the datatable only has 13 records, I need to pad the array with 3 additional etc. etc.
Any thoughts.
Code Snippet:
1:
arrToLabels(i) = "To:" + DtSet.Tables(0).Rows(i).Item(0) + "-" + DtSet.Tables(0).Rows(i).Item(1)
Open in New Window
Select All
Answer : Array Help
If DtSet.Tables(0).Rows / 4 = 0 Then
arrSize = DtSet.Tables(0).Rows
Else
arrSize = DtSet.Tables(0).Rows + (4 - (DtSet.Tables(0).Rows Mod 4))
End If
Random Solutions
Strange recycling of ASP.NET worker process without hitting any pre-defined limits!
Microsoft sql2005 security patch
Need to convert bytes to image in web page ASP.Net C#
Excel - Using Find Method to Locate a Cell in Another Open Workbook
Use a query result to populate recipients in SendObject
How do I restore the toolbar at the bottom of Outlook Mailbox where the number that shows the number of email messages is located.
Code retriving duplicated numbers.
WSUS on Windows 2003 R2 Standard, Does the Report Viewer 2008 Work on this.
creating system.mdw whit VB 5
Check Box issue