Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/10/2016, 12:08
Avatar de gaibrus3wood
gaibrus3wood
 
Fecha de Ingreso: diciembre-2014
Mensajes: 8
Antigüedad: 9 años, 5 meses
Puntos: 0
Respuesta: Error al cargar un componenete.

Desde el examinador de componentes de Visual Studio, elijo el DLL. Este en el directorio que indicas, dentro del proyecto, o de otro... el error sigue saliendo.

El código es el siguiente aunque como comento, funciona bien en otros ordenadores.

Código:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace ConversorDLL
{
    public class conversor : System.ComponentModel.Component
    {

        private string binario = "0";
        private int valor = 0;

        [RefreshProperties((RefreshProperties.All))]
        public string Binario
        {
            get { return binario; }
            set
            {
                binario = value;
                valor = 0;
                int exp = 0;
                for (int contador = binario.Length - 1; contador > 0; contador--)
                    valor = (int)(System.Math.Pow(2, exp) * Char.GetNumericValue(binario[contador]));
            }
        }

        public int Valor
        {
            get { return valor; }
            set
            {
                valor = value;
                binario = Convert.ToString(valor, 2);
            }
        }
    }
}