Skip to content

CS411 - Visual Programming

4 Topics 31 Posts
  • CS411 GDB 1 Solution and Discussion

    cs411 gdb 1 solution discussion fall 2019
    4
    0 Votes
    4 Posts
    2k Views
    zareenZ
    https://youtu.be/Syd3CoysHnQ
  • 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>
  • CS411 Assignment 1 Solution and Discussion

    Solved cs411 assignment 1 solution discussion fall 2019
    7
    0 Votes
    7 Posts
    2k Views
    zaasmiZ
    100% Solved: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Student { public int x; public Student() { } public Student(int i) { x = i; // y = j; } /* public void Showsum() private int sum1 = x + y; { Console.WriteLine(sum1); }*/ public static Student operator +(Student ss, Student ss2) { Student temp = new Student(); temp.x = Int32.Parse(ss.x.ToString() + ss2.x.ToString()); return temp; // return temp = tostring(d1) + tostring(d2); } public static Student operator * (Student ss, Student ss2) { double d= (double)ss.x; double dd = (double)ss2.x; Student temp = new Student(); double result= Math.Pow( d ,dd); temp.x =(int) result; return temp; // return temp = tostring(d1) + tostring(d2); } class Program { static void Main(string[] args) { Student s1 = new Student(2); //S1.Showsum(); // displays 15 Student s2 = new Student(4); Student s3 = s1 + s2; Console.WriteLine(s3.x.ToString()); Student s4 = s1 * s2; Console.WriteLine(s4.x.ToString()); Console.Read(); //S2. } } } } [image: yIfOM7y.gif] ConsoleApplication1.zip
Reputation Earning
How to Build a $1,000/Month World CUP LIVE Matches Live Cricket Streaming
Ads
File Sharing
Stats

0

Online

3.0k

Users

2.8k

Topics

8.6k

Posts
Popular Tags
Online User
| |