CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of VB.NET
Usage
'strContent = AES_Encrypt(strContent, "somepassword")
'File.WriteAllText("encrypted.txt", strContent)
 
'strContent = AES_Decrypt(strContent, "somepassword")
'File.WriteAllText("decrypted.txt", strContent)
 
  Public Function AES_Encrypt(ByVal input As String, ByVal pass As String) As String
        Dim AES As New System.Security.Cryptography.RijndaelManaged
        Dim Hash_AES As New System.Security.Cryptography.MD5CryptoServiceProvider
by DaveCS   March 14, 2012 @ 7:03am
138 Views
no comments
 
Module Module1
    Public Enum PivotAction
        Sum = 1
        Min = 2
        Max = 3
        Count = 4
    End Enum
    Public Function Pivot(ByVal SourceTable As DataTable, _
                          ByVal PrimaryKeyColumn As String, _
                          ByVal PivotNameColumn As String, _
by aKocen   September 26, 2011 @ 7:57am
138 Views
1 comments
 
''' <summary>
''' An Extension of the ControlCollection
''' </summary>
''' <param name="controls"></param>
''' <returns>An Enumerable collection of all of the controls in a ControlCollection</returns>
''' <remarks></remarks>
<Extension()> _
Public Function All(ByVal controls As ControlCollection) As IEnumerable(Of Control)
    Dim results As New List(Of Control)
    For Each Control As Control In controls
by Thom Lamb   June 13, 2011 @ 10:39am
153 Views
no comments
 
        Partial MustInherit Class InformationSchema
            Inherits System.Data.Linq.DataContext
 
            Private Shared mappingSource As System.Data.Linq.Mapping.MappingSource = New AttributeMappingSource
 
#Region " Constructors "
 
            Public Sub New(ByVal connection As String)
                MyBase.New(connection, mappingSource)
            End Sub
by Thom Lamb   June 09, 2011 @ 8:44am
238 Views
no comments
 
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.Linq
Imports System.Data.Linq.Mapping
Imports System.IO
Imports System.Linq
Imports System.Text
Imports System.Diagnostics
Imports System.Reflection
by Thom Lamb   June 09, 2011 @ 8:40am
411 Views
no comments
 
 
#Region " Import Declaratives "
 
Imports System.ComponentModel
Imports System.Data.Linq
Imports System.Data.Linq.Mapping
Imports System.Reflection
 
#End Region
by Thom Lamb   April 08, 2011 @ 11:02am
303 Views
no comments
 
Module Module1
 
    Sub Main()
        Dim InputXml = <?xml version="1.0" encoding="utf-8"?>
                       <users>
                           <user id="1" name="Eduardo"/>
                           <user id="2" name="Luciano"/>
                           <user id="3" name="Ricardo"/>
                       </users>
376 Views
no comments
 
Imports System.Text.RegularExpressions
 
Module Module1
 
    'http://learn.open.ac.uk/mod/oublog/viewpost.php?post=23031
    'www.ForkandBeard.co.uk
 
    Sub Main()
        Dim strUserNumbers As String()
        strUserNumbers = New String() { _
by Mitchell William Cooper   November 26, 2009 @ 5:28am
441 Views
no comments
 
Imports System.Text.RegularExpressions
 
Module Module1
 
    Sub Main()
        Dim strUserNumbers As String()
        strUserNumbers = New String() { _
              "H0W_BOvThemy84kies" _
              , "01543 MWC66" _
              , "8" _
by Mitchell William Cooper   November 26, 2009 @ 5:27am
307 Views
no comments
 
Imports System
Imports System.Linq
Imports System.Net.Mail
Imports System.Web.Mvc
Imports System.Web.Security
Imports MvcMembership
 
 
 
<Authorize(Roles:="Administrador")> _
by Eduardo Molteni   October 22, 2009 @ 8:51am
1154 Views
no comments
 
<Extension()> _
Function ToEnum(Of T)(ByVal str As String) As T
    Return DirectCast([Enum].Parse(GetType(T), str), T)
End Function
 
by Steve Wright   October 09, 2009 @ 6:30am
263 Views
no comments
 
Dim Message As String = String.Empty
Dim TargetUserName = String.Empty  'but could be "seller1" or "seller2"
 
Dim credentials As UserIdPasswordType = New UserIdPasswordType
credentials.Username = "master1"
credentials.Password = "master1password"
credentials.Signature = "master1signature"
If Not String.IsNullOrEmpty(TargetUserName) Then credentials.Subject = TargetUserName
 
Dim customSecurityHeader As CustomSecurityHeaderType = New CustomSecurityHeaderType
by MorningZ   September 23, 2009 @ 9:39am
Tags: PayPal, VB.NET
395 Views
no comments
 
Public Class DieCollection
    Inherits System.Collections.ObjectModel.Collection(Of Die)
    Public Function RollAll() As Integer()
        Dim values(Me.Count - 1) As Integer
 
        For index As Integer = 0 To values.GetUpperBound(0)
            values(index) = Me.Items(index).Roll()
        Next
        Return values
    End Function
by Paul   August 28, 2009 @ 1:11pm
Tags: dice, vb.net
354 Views
no comments
 
''' <summary>
''' Rotina para forçar o download de arquivos
''' </summary>
''' <param name="caminhoArquivo">Caminho para o arquivo no sistema de arquivos</param>
''' <param name="contentType">Content-Type do arquivo (opcional)</param>
Protected Sub ForceDownload(ByVal caminhoArquivo As String, _
                            Optional ByVal contentType As String = "application/octet-stream")
    Dim arquivo As FileInfo = New FileInfo(caminhoArquivo)
    Response.Clear()
    Response.AddHeader("Content-Disposition", "attachment; filename=" + arquivo.Name)
by Rogério Bragil   August 12, 2009 @ 6:28am
432 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate