SHARE
TWEET

Enumerable.Batch

a guest Jun 26th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Main
  2.    
  3.     Dim record As String = New String("0", ((240 * 3) + 7))
  4.  
  5.     Dim ChunkLength As Integer = 240
  6.  
  7.     Dim chunks As List(Of String) = Enumerable.Range(0, Math.Ceiling(record.Length / ChunkLength)).Select(Function(i) record.Substring(i * ChunkLength, Math.Min(ChunkLength, record.Length - (i * ChunkLength)))).ToList
  8.  
  9.        
  10.     chunks.Dump()
  11.  
  12. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top