|
How the heck did you manage to get anything working in VB.NET without using classes? Everything is class based! The whole of .NET is a massive collection of classes!
I think that you need to go back to basics, and start from scratch with the basics of OOPs - you would not understand the code to solve that homework without that, and that makes the whole exercise futile for both of us. Me, because I waste my time on something you can't use unless you hand it in as your own work; yours because it means that the next piece of homework is even more difficult for you - and you fail your course because you can't catch up.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I agree that everything in .NET is class based. I meant to say I have never created a class of my own.Hence it is difficult for me to work on this task. I apologize that I have wasted your time. Just wanted some explanation from your end because I felt that you were very much clear about my task. I still feel that a bit explanation from your end will help me understand this task and despite your explanation I failed to understand this task I will stop posting message. Hoping for some positive reply from your end.
|
|
|
|
|
I can't teach you how to create classes in C# - that's trivial as far as code goes:
public class MyClass : ClassImDerivedFrom
{
private string myField;
public string MyProperty {get; set; }
}
But it's the logic, the background, and the reasoning that I can't explain - I only get a small text box to type into.
So go back to your course notes, go back to your textbook, and start reading. There is a lot to understand, and it's all absolutely basic and fundamental. Until you are up to speed with the whys and wherefores of classes, there is no point in your trying to do this exercise!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: I can't teach you how to create classes in C#
See the other top level post - it is a class assignment. They are supposed to be learning how to create classes.
|
|
|
|
|
nisss wrote: There is a new project I created within the solution. If you get the latest version of the solution from source control you should see it. There are currently no classes in it. That is obviously a note from your teacher so he/she is the person to ask for guidance.
|
|
|
|
|
Good catch. From only a brief look and the other responses I was thinking that a company just threw a very junior developer a project without a mentor.
|
|
|
|
|
Your impression could also be correct - which is even more scary.
|
|
|
|
|
|
|
What you're being asked to do is what the "Forms Designer" generates (in terms of code) in reponse to your "design" using design-time tools (toolbox; controls; etc).
Create a new C# Windows Forms project, and look at the "source code". The source code showns how a "program" builds a Windows UI using only code. Once you understand that (creating controls, adding to parent controls, updating layout), you'll be on your way.
(It's called "reverse_engineering", and is how the rest of the world beat the West).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Thank you so much for guiding me rather than discouraging me.
|
|
|
|
|
Any time!
"Class" assignment (pardon the pun) or not, you get extra points for being able to carry on an intelligent conversation.
And I was "on call" the first 2 weeks into my first job; so those that can, do (the "fast immersion" track).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
modified 15-Dec-17 5:12am.
|
|
|
|
|
Hope someone can share some knowledge.
I made a HttpPost method, which sent a list of ids to a method in my service. The method then compared the ids to a anothers list, and return the object, which does´t contain the ids from the post request.
Now I want to make a HTTP Get method, which get the object after they are sorted
<pre> public List<ProductBO> GetAll()
{
using (var uow = facade.UnitOfWork)
{
return uow.ProductRepository.GetAll().Select(p => Pconv.Convert(p)).ToList();
}
}
public List<ProductBO> FilteretProduct(List<int> ids)
{
var AllProducts = GetAll();
List<ProductBO> FilteredProducts = new List<ProductBO>();
foreach (var prod in AllProducts)
{
foreach (var id in ids)
{
if (!prod.IngredientIds.Contains(id))
{
FilteredProducts.Add(prod);
}
}
}
return FilteredProducts;
}
<pre>
[HttpPost]
[Route("FilteredProducts")]
public List<ProductBO> FilteredList(List<int> ids)
{
List<ProductBO>filterProduct;
return filterProduct = facade.ProductService.FilteretProduct(ids);
}
[HttpGet]
[Route("GetFilteredProducts")]
public List<ProductBO> GetFilteredList()
{
return filterProduct;
}
|
|
|
|
|
That doesn't make any sense. Web applications are stateless - they don't remember state from one request to the next. So even if you moved your local variable out of the POST method to make it available from the GET method, by the time you made the GET request, the content of the variable would have been lost.
You would need to use some form of session storage to persist the data between the requests. The precise details of how you do that will depend on how you're hosting your application, and whether you're using the full framework or .NET Core.
It's not clear why you would need two requests, when the POST request already returns the data?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
thanks for the replay!
Normally I make a post request to insert some values and af get request to get some values.
I didn´t know you could do that with a post request ?
|
|
|
|
|
i have two interface with diffrent name but method name will same and i am consumming in a class both interface how i know which method will cll i1 method or i2 method
|
|
|
|
|
What you are looking for is the difference between an implicit and explicit interface. There's a very good explanation here[^].
This space for rent
|
|
|
|
|
How to make Voting system in C# that should be object oriented programming?
|
|
|
|
|
Gather the requirements, identify the inputs and outputs, design the user interface, and write and test the code.
|
|
|
|
|
first each user should save ther self with fingerprint scanner and then can vote to the candidates.
candidates must have photo and name
|
|
|
|
|
|
Those aren't requirements; that's a vague wishlist. For instance, what types of photo id are you accepting? What happens if the fingerprint scanner breaks down? How are the candidate details stored? How do you vote for them?
This space for rent
|
|
|
|
|
And?
What have you done so far?
Where are you stuck?
What help do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: What help do you need?
Well duh - send the codez NOW!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
That was my guess: "I want you to do my homework" but it'd be nice to know if he's genuine and wants to think or just waste his whole life ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|