Skip to content

CS411 - Visual Programming

3 Topics 31 Posts
  • 0 Votes
    2 Posts
    878 Views
    zaasmiZ
    Please share idea
  • 0 Votes
    4 Posts
    2k Views
    zareenZ
    @zareen said in CS411 Assignment 3 Solution and Discussion: threadpool public static class ThreadPool Examples using System; using System.Threading; public class Example { public static void Main() { // Queue the task. ThreadPool.QueueUserWorkItem(ThreadProc); Console.WriteLine("Main thread does some work, then sleeps."); Thread.Sleep(1000); Console.WriteLine("Main thread exits."); } // This thread procedure performs the task. static void ThreadProc(Object stateInfo) { // No state object was passed to QueueUserWorkItem, so stateInfo is null. Console.WriteLine("Hello from the thread pool."); } } // The example displays output like the following: // Main thread does some work, then sleeps. // Hello from the thread pool. // Main thread exits. void WaitCallback(Object state) Source
  • CS411 Assignment 2 Solution and Discussion

    Solved cs411 assignment 2 solution discussion fall 2019
    4
    0 Votes
    4 Posts
    1k Views
    zareenZ
    Main Code File string stringToSearch = TextBox1.Text; string[] lines = File.ReadAllLines(@"H:/james.txt"); foreach (string line in lines) { if (line.IndexOf(stringToSearch) >= 0) { Label1.Content = line; break; } else { Label1.Content = "VU ID Not Found"; } } XAML File <Window x:Class="CS411_Assign.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <TextBox x:Name="TextBox1" HorizontalAlignment="Left" Height="23" Margin="165,87,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="237"/> <Button Content="Search" HorizontalAlignment="Left" Margin="165,153,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/> <Label x:Name="Label1" Content="Data" HorizontalAlignment="Left" Margin="165,206,0,0" VerticalAlignment="Top" Width="222"/> <Label Content="Vu-Student Id" HorizontalAlignment="Left" Margin="10,87,0,0" VerticalAlignment="Top"/> </Grid> </Window>
How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
File Sharing

2

Online

3.0k

Users

2.8k

Topics

8.2k

Posts
| |