Categories > Coding > C# >

400th Thread!

Posts: 1138

Threads: 84

Joined: Apr, 2020

Reputation: 34

Posted

400th thread in C#

https://cdn.discordapp.com/attachments/739373506243854380/742498195292028998/bjdFsx.png

  • 0

modifying a ui and calling it yours does mean it's your ui.

- JalapenoGuy

https://media.discordapp.net/attachments/769992459916017687/1065084754128539658/image0.jpg

Posts: 848

Threads: 72

Joined: May, 2020

Reputation: 9

Replied

You should atleast add a tip in here so it's not a meaningless thread

  • 0

Don't buy exploits its not worth it your gonna quit anyway

Taking accountability will help you excel in life

Wabz

Winning.js

Posts: 2410

Threads: 194

Joined: Apr, 2020

Reputation: 27

Replied

@ZaphireHacks Here's a tip for you:

Have you ever been lazy and wanted to not specify types when doing stuff?

Then var and dynamic are for you!

You can use var when you declare a variable, it's gonna adjust the type.

You can use dynamic when you wanna possibly return different types, it's basically var but for return types (it returns an object)

 

That was the lazy C# tip of the day!

  • 0

Added

Also here is an example (use WRD+ to see it properly) or check this hastebin: https://hastebin.com/pejofubaja.cs

[code]

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace LazyBoi

{

    class Program

    {

        static dynamic GetSomeRandomType(dynamic thing)

        {

            switch (thing)

            {

                case "hello":

                    return 3;

                case 2f:

                    return "lmao";

                case 11:

                    var lol = 3.11;

                    return lol;

                default:

                    dynamic[] stuff = { 0, 1, 2 };

                    return stuff;

            }

        }

        static void Main(string[] args)

        {

            var test1 = GetSomeRandomType("hello");

            var test2 = GetSomeRandomType(2f);

            var test3 = GetSomeRandomType(11);

            var test4 = GetSomeRandomType("trigger default");

            Console.WriteLine(test1);

            Console.WriteLine(test2);

            Console.WriteLine(test3);

            foreach(var element in test4)

            {

                Console.Write(element + ", ");

            }

            Console.ReadLine();

        }

    }

}

[/code]

  • 0

Added

Don't laugh at this code, it was just to prove that it's possible to be lazy

  • 0

My new discord is Wabz#1337 with ID 777154062789509130

Posts: 848

Threads: 72

Joined: May, 2020

Reputation: 9

Replied

@Wabz lol thanks :)

  • 0

Don't buy exploits its not worth it your gonna quit anyway

Taking accountability will help you excel in life

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )