Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

load c# code from different file

Featured Replies

Hi,

 

im relatively new to this bot and coding c# in general, so please dont mind if the question seems dumb ^^

 

I'd like to create a utility class for some code i need for multiple FightClasses.

Looking up how this would be done in c# i found this:

the util:

using System;

namespace MyNamespace
{
    public class WowUtil
    {
		[...]
    }
}

and the FightClass:

using System;
[...]
using MyNamespace;

public class Main : ICustomClass
{

}

 

Trying to run this i get the error

"The type or namespace 'MyNamespace' could not be found. Missing using directive or assembly reference"

 

is this / something similar possible at all, and if yes what am i doing wrong? ^^

 

thanks in advance 🙂

 

Hello,

If you give WRobot a .cs file, you cannot use newer C# features (like 'using MyNamespace;').

To use these new features, give compiled files to WRobot (dll).

'public class Main: ICustomClass' must not have a namespace for WRobot to find the class.

For example, you can look at this code to see how to separate your code into several classes :   https://wrobot.eu/forums/topic/11961-fightclass-framework-for-243335a-and-more/

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.