forked from nanoframework/Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
33 lines (25 loc) · 967 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
using System;
using System.Diagnostics;
using System.Threading;
namespace ManagedResources
{
public class Program
{
public static void Main()
{
// to use managed resources:
// 1. add a reference to nanoFramework.Runtime.Native
// 2. Add a managed resource file (.resx extension)
// 3. Access the resource using the appropriate getter as shown bellow
Debug.WriteLine(Resources.GetString(Resources.StringResources.String1));
Thread.Sleep(2000);
Debug.WriteLine(Resources.GetString(Resources.StringResources.String2));
Debug.WriteLine($"PNG image has {Resources.GetBytes(Resources.BinaryResources.nano_Framework_logo_32_border_trans).Length} bytes");
Thread.Sleep(Timeout.Infinite);
}
}
}