DEV Community

Cover image for VB .Net: TryAgainQuestionForExistItem
vblover programmer
vblover programmer

Posted on • Edited on

VB .Net: TryAgainQuestionForExistItem

    Function TryAgainQuestionForExistItem(ItemName As String, ID As Object) As Boolean
        Console.Clear()
        Console.WriteLine()
        Console.ForegroundColor = ConsoleColor.Red
        Console.WriteLine("{0} {1} already Exists, with same ID: ({2})!", vbTab, ItemName, ID)
        Console.ForegroundColor = ConsoleColor.Yellow
        Console.WriteLine("{0} Do you want to try again?", vbTab)
        Console.ForegroundColor = ConsoleColor.White
        Console.Write("{0} Type Y[es] to Accept: ", vbTab)
        Console.ForegroundColor = ConsoleColor.Gray
        Value = Console.ReadLine
        'If Value.Length = 0 Then Return False
        Select Case Value.Trim.ToLower
            Case "y", "yes"
                Console.Clear()
                Return True
            Case Else
                Return False
        End Select
    End Function
Enter fullscreen mode Exit fullscreen mode

https://aparat.com/v/dvbe180

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

If this post resonated with you, feel free to hit ❤️ or leave a quick comment to share your thoughts!

Okay