I have compiled a C# class as a .dll named TileCalculations.dll
Within the Class its namespace is TileCalculations and the Class is TileSystem
namespace TileCalculations
{
static class TileSystem
I have attempted to add this to a vb.net poject using Project > Add Reference and navigating to that file and selecting this dll. I see the dll in my Project Properties Window and the Local Copy property is set to True.
I have included the following:
Imports System.Net
Imports System.Diagnostics
Imports System.IO
Imports System.Math
Imports System.Text.RegularExpressions
Imports System.Threading.Thread
Imports System.Text
Imports System.Drawing
Imports TileCalculations
An example Function in that Class is:
/// <summary>
/// Determines the map width and height (in pixels) at a specified level
/// of detail.
/// </summary>
/// <param name="levelOfDetail">Level of detail, from 1 (lowest detail)
/// to 23 (highest detail).</param>
/// <returns>The map width and height in pixels.</returns>
public static uint MapSize(int levelOfDetail)
{
return (uint)256 << levelOfDetail;
}
How do I call the function MapSize. I am trying;
Dim intmyValue As Int32 = MapSize(17) ' should equal 33,554,432
I get a message 'MapSize' is not declared. It may be inaccessible due to its
protection level.
Within the Class its namespace is TileCalculations and the Class is TileSystem
namespace TileCalculations
{
static class TileSystem
I have attempted to add this to a vb.net poject using Project > Add Reference and navigating to that file and selecting this dll. I see the dll in my Project Properties Window and the Local Copy property is set to True.
I have included the following:
Imports System.Net
Imports System.Diagnostics
Imports System.IO
Imports System.Math
Imports System.Text.RegularExpressions
Imports System.Threading.Thread
Imports System.Text
Imports System.Drawing
Imports TileCalculations
An example Function in that Class is:
/// <summary>
/// Determines the map width and height (in pixels) at a specified level
/// of detail.
/// </summary>
/// <param name="levelOfDetail">Level of detail, from 1 (lowest detail)
/// to 23 (highest detail).</param>
/// <returns>The map width and height in pixels.</returns>
public static uint MapSize(int levelOfDetail)
{
return (uint)256 << levelOfDetail;
}
How do I call the function MapSize. I am trying;
Dim intmyValue As Int32 = MapSize(17) ' should equal 33,554,432
I get a message 'MapSize' is not declared. It may be inaccessible due to its
protection level.