Skip to content

Instantly share code, notes, and snippets.

Coding :)

Omer Hijazi omerhijazi404

Coding :)
View GitHub Profile
omerhijazi404 / Wait.cs
Created Sep 16, 2020
An alternative for the await command, can be used in any function.
View Wait.cs
// Main Function
public void Wait(int TimeToWait) {
int bob = DateTime.Now.Millisecond + TimeToWait;
for (int bib = DateTime.Now.Millisecond; bob != bib; bib = DateTime.Now.Millisecond) {}
// Example by Instance
public class Wait {
public void Wait(int Seconds) {
int bob = DateTime.Now.Second + Seconds;
View include.html
<title>string.includes() alternative</title>
// Alternative for string.includes() method,
// which doesn't work in Internet Explorer.
// This uses the method,
// which has two advantages;
// One, that it works in all browsers as it is part of ECMAScript 1,
// Two, it supports RegEx.
You can’t perform that action at this time.