✅ Homework Help

https://i.gyazo.com/f23d758d46581bcfb84f88d4178cd484.png What should I return from the FillArray() method? It would make a lot more since if I was returning an array, if the return type was an int[], but the return type is an int, therefore it should just be returning single ints. I am not sure how it is supposed to work given I am putting the entire array into FillArray() and then it's just supposed to return a single int, which I assume is the individual element. Any help would be welcome.
i mean the array itself dervives from Array<T> so it's actually a reference type. you just may want to operate directly on the int[] array param itself and it will reflected to the passed arg
Stack Overflow
Reference type vs value type
I'm reading about structs and classes in C# and to my understanding structs are value types and classes are reference types. But I'm a little confused about how class objects behave when they are p...
then for the return you just may need to return the length of the array as the response template requirement suggest i read the homework better and before i understood you question wrongly , hope that helps anyway
the signature of FillArray was provided for you? my guess is it's supposed to be the number of elements that were given by the user
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Hello // Program demonstrates overloaded methods // that display an int, an amount of money, or a string // decorated with an argument character // or a default character 'X' using System; using static System.Console; using System.Globalization; class DebugEight4 { static void Main() { FancyDisplay(33); FancyDisplay(44, '@'); FancyDisplay(55.55); FancyDisplay(77.77, '*'); FancyDisplay("hello"); FancyDisplay("goodbye", '#'); } public static void FancyDisplay(int num, char decoration = 'X') { WriteLine("{0}{0}{0} {1} {0}{0}{0}\n", decoration, num); } public static void FancyDisply(double num, char decoration = 'X') { WriteLine("{0}{0}{0} {1} {0}{0}{0}\n", decoration, num.ToString("C", CultureInfo.GetCultureInfo("en-US"))); } public static void FancyDisplay(string word, char decoration = 'X') { WriteLine("{0}{0}{0} {1} {0}{0}{0}\n", decoration, word); } } Any clue why this isn't working? Error CS1503 Argument 1: cannot convert from 'double' to 'int' @line --- FancyDisplay(55.55);
FancyDisply you made a typo here
@jcotton42 Gracias

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
❔ force a ushort value?if i type for example var num = 25L; i am forcing a long value (int64) how can i force a ushort in ❔ Doing post method with entity frameworki'm making a simple API to practice with entity framework but when i try to make a post to a table w❔ I can't reference a class library please helpI can't reference a class library i t says compilation error❔ ASP.NET REMOTE DEVELOPMENTHey does anyone know if I would need nginx for remote development on a ubuntu server from my windowException/NULL/Error handling advice.DeserializeAsync clearly returns a nullable generic object. From the picture we can clearly see that❔ ASP.NET Core web app vs ASP.net web application(.NET Framework)Hi, Ive been working with c# for a while now and would like to make a webapp but I dont know where t✅ IGNORE PEOPLEmy place for testing commands❔ Game Hubhi, how can i program my own game hub, like battle.net where i can download and start my own games ?❔ ✅ beginner class and propertiesi am doing basic program abt class and getting information from input but on the weight section whe❔ Best practice to retrieve MySQL columnsHello wonderful people! Can you please help me understanding what would be the best practice to ret❔ Auto Slide Showhere my code✅ materialDesign:Cardfor some reason it says that closing matrialcard doesent exist and it shows an error❔ Why does this code give the CS8604 warning?I'm confused why the below code gives the CS8604 warning. As far as I am concerned, I am null checki✅ Having trouble adding a picture to my code.what should the path look like?❔ Producer Consumer ISourceBlock<T>, periodically flushing consumed dataHi, I've the following scenario: I've a camera continuously acquiring frames and a c# app receiving ❔ Load async data and display it (WindowsAppSDK / WinUI3)I am currently developing my first windows app with C#, Windows App SDK and WinUI3. I want to do som❔ Best Approach to Implement Authentication and Authorization in Microservices with ASP.NET CoreHi friends, I'm looking for experience share. I have Microservices architecture project, that uses ❔ Performance of many small requests vs less but bigger requestsI have 2 projects: an API hosted on aws and a desktop application. Currently, I'm fetching around 4k✅ Image from dataurlI have dataurl with image and i need to get it to some reasonable image object in c#, so i can resiz✅ why does the test case fail?This is from a longest palindrome puzzle on LeetCode https://leetcode.com/problems/longest-palindrom