TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shashini Nagasingha
NA
26
3.6k
I'm getting errors
Aug 23 2019 11:53 PM
Following errors, I'm getting
Warehouse.cs(34,36): error CS0246: The type or namespace name 'StockSaleTransaction' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\User\Documents\Codes\Warehouse\Warehouse.csproj]
Warehouse.cs(38,36): error CS0246: The type or namespace name 'StockPurchaseTransaction' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\User\Documents\Codes\Warehouse\Warehouse.csproj]
Warehouse.cs(42,36): error CS0246: The type or namespace name 'StockAdjustmentTransaction' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\User\Documents\Codes\Warehouse\Warehouse.csproj]
Can please help me to find errors
This is my code
using System;
using SplashKitSDK;
using System.Collections.Generic;
public class Warehouse
{
private List<Stock> _stockItems = new List<Stock>();
public void AddNewStockItem(Stock stock)
{
_stockItems.Add(stock);
}
public Stock GetStock(string name)
{
foreach (Stock stock in _stockItems)
{
if (stock.Name.ToLower() == name.ToLower())
{
Console.WriteLine(stock);
return stock;
}
}
return null;
}
public void ExecuteTransaction(StockSaleTransaction transaction)
{
transaction.Execute();
}
public void ExecuteTransaction(StockPurchaseTransaction transaction)
{
transaction.Execute();
}
public void ExecuteTransaction(StockAdjustmentTransaction transaction)
{
transaction.Execute();
}
}
Reply
Answers (
3
)
How to access the nodes and its elements in XML using c#
fetch xml from xml document