Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

C# Funktion in t4 Template aufrufen

Empfohlene Antworten

Veröffentlicht

Hallo,

ich versuche gerade in einem t4 Template eine Funktion aufzurufen, die nicht im Template liegt.

<# foreach(KeyValuePair<int, string> tr in Translation.LoadAllForEnum())

		{#>

			<#= tr.Value #> = <#= tr.Key #> ,

		<#}#>
Der namespace ist auch drin:
<#@ import namespace="Testapplication.Model" #>

Doch er kann den Namespace oder die Funktion LoadAllForEnum nicht finden. Was mache ich falsch?

Bearbeitet von Kaktusfan1707

  • Autor

Jetzt habe ich mich doch zu früh gefreut.

In der WindowsForms-Anwendung binde ich meine neue Monitoring.dll ein. Doch im Code von einer Form unterringelt er mir "MonitoringLibrary" und "Settings" was eine Klasse in MonitoringLibrary ist findet er auch nicht.

using MonitoringLibrary;

using System;

using System.Windows.Forms;


namespace MeinMonitoring

{

    public partial class Optionen : Form

    {

        Settings user;

        Settings password;

...

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.