Magento – How to get currency Symbol in magento 2

currencymagento2multicurrencyobject-manager

I want currency Symbol using currency code in magento 2. so any one help me?

I have tried below code but I got error Class Magento\Directory\Model\CurrencyFact‌​ory does not exist

$_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$currencyManager = $_objectManager->create('Magento\Directory\Model\CurrencyFac‌​tory')->create()->ge‌​tResource(); 
echo $currencySymbol = $currencyManager->getCurrencyCodeFromToCurrency($_code);

Best Answer

<?php
class Customclass{
    protected $storeManager;
    protected $currencySymbol;
    protected $localeCurrency;
    public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Directory\Model\Currency $currencySymbol,
        \Magento\Framework\Locale\CurrencyInterface $localeCurrency
    ) {
        $this->_storeManager = $storeManager;
        $this->currencySymbol = $currencySymbol;
        $this->localecurrency = $localeCurrency;
    }

    public function getStoreCurrency(){
        $currencycode = $this->_storeManager->getStore()->getCurrentCurrencyCode();
        return $this->localecurrency->getCurrency($currencycode)->getSymbol();
    }
}