Coder Social home page Coder Social logo

multithreading-using-csharp's Introduction

Fibonacci Number Generator

This Windows Forms application generates Fibonacci numbers asynchronously using threads.

Description

This program allows users to input a positive integer and generates Fibonacci numbers up to the specified count in a ListBox control. The generation of Fibonacci numbers is performed asynchronously using Task-based asynchronous programming (TAP) and multithreading.

Features

  • Asynchronously generates Fibonacci numbers.
  • Validates user input to ensure it is a positive integer.
  • Clears previous output before generating new Fibonacci numbers.

Controls

  • btnGenerate: Button control to initiate the generation of Fibonacci numbers.
  • txtNumber: TextBox control for the user to input the count of Fibonacci numbers to generate.
  • listBoxOutput: ListBox control to display the generated Fibonacci numbers.

Usage

  1. Enter a positive integer in the TextBox.
  2. Click the "Generate" button.
  3. The generated Fibonacci numbers will be displayed in the ListBox.

Implementation Details

  • btnGenerate_Click: Event handler for the button click to start the Fibonacci number generation process. It validates user input and triggers the asynchronous generation of Fibonacci numbers.
  • GenerateFibonacciNumbersAsync: Asynchronously generates Fibonacci numbers up to the specified count. It uses Task-based asynchronous programming (TAP) and locks the access to the ListBox control to ensure thread safety.
  • GenerateFibonacciNumber: Recursive function to generate the nth Fibonacci number.

Technologies Used

  • C#
  • .NET Framework
  • Windows Forms

Requirements

  • .NET Framework installed on the system.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Author

Ramees Karolil Rasheed

multithreading-using-csharp's People

Contributors

ramees-kr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.