Categories > Coding > C# >
400th Thread!
Posted
400th thread in C#
https://cdn.discordapp.com/attachments/739373506243854380/742498195292028998/bjdFsx.png
modifying a ui and calling it yours does mean it's your ui.
- JalapenoGuy
https://media.discordapp.net/attachments/769992459916017687/1065084754128539658/image0.jpg
Replied
You should atleast add a tip in here so it's not a meaningless thread
Cancel
Post
Don't buy exploits its not worth it your gonna quit anyway
Taking accountability will help you excel in life
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!
Cancel
Post
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]
Cancel
Post
Added
Don't laugh at this code, it was just to prove that it's possible to be lazy
Cancel
Post
My new discord is Wabz#1337 with ID 777154062789509130
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 )
Cancel
Post