Difficulty: Beginner
Estimated Time: 10 minutes

Imports System Imports System.Data Imports System.Data.DataSetExtensions Imports System.Xml Imports System.Collections Imports System.Collections.Generic

Imports System.Linq

Public Module Module1 Public Sub Main() Dim dt = New DataTable() dt.Columns.Add("Name") dt.Columns.Add("Description") dt.Columns.Add("email") Dim dr = dt.NewRow() dr(0) = "Jk" dr(1) = "janakana" dr(2) = "[email protected]" dt.Rows.Add(dr) dr = dt.NewRow() dr(0) = "Jk1" dr(1) = "janakana2" dr(2) = "[email protected]" dt.Rows.Add(dr) dr = dt.NewRow() dr(0) = "Jk23" dr(1) = "janakana23" dr(2) = "[email protected]" dt.Rows.Add(dr) Console.WriteLine(dt.Columns.Count) Console.WriteLine(dt.Rows.Count) Dim dtEn = dt.AsEnumerable()

Dim grps = dtEn.GroupBy(Function(tbl) tbl("email")) _ .Select(Function(tbl){ tbl.Key,tbl.ToList() }).ToList()

 Console.WriteLine(grps) 
  

For Each g In grps Console.WriteLine(g(0))

 Dim listDr as List(Of DataRow)
   listDr = g(1)
   Dim name =listDr.Select(Function(row) row(0) )
     Console.WriteLine(name)
  For Each dr in g(1)
   Console.WriteLine(dr(0))
  Next
  
      Next
  

End Sub End Module

Outlook.Application app = new Outlook.Application(); Outlook.MailItem mailItem = app.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "This is the subject"; mailItem.To = "[email protected]"; mailItem.Body = "This is the message."; mailItem.Attachments.Add(logPath);//logPath is a string holding path to the log.txt file mailItem.Importance = Outlook.OlImportance.olImportanceHigh; mailItem.Display(false);

outlook

App

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

This tab will not be visible to users.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]